extracted inline js to its own file (main.js for now)