adding model fitting script