add comments to controller.js