moved scrip over to main.js