update move javascript to main.js