working on the controller