Fitting the model