generating update model and updates controller