upadted controllers.js