some changes to main.js