Working version of fit_sota_model