added stepped model fitting