adding some changes to the controller