controllers.js modification