copied js in index.html to main.html