Update main.js to work