changed some lines of code in main.js