separate main.js from index.html