updae the model