modified index.js and app.js