fixed some of the controller structure