separated main to main.js