minor change on fit_line