changing the way the controller is written