updated controllers.js