moved js to main.js