update the model