modified main.js file