updated app.js and index page