Add update method to the controller