updated main.js and app.js