some changes to the controller