removed unecessary code in controller