working on model fitting