updating main.js (wip)