move js to main.js