changed controller.js