model fitting in Python by Fabs