Update main.js

some changes