move script to main.html