separate js into main.js (best practice)