final changes for controller