controller in main.js