update the controller and the view