modified main.js