major changes on app.js