added code to app.js file