teg_fit