final changes to main.js