updated the controller class