modified controllers.js