removed unused function in controller.js