update model and controller