updates to app.js for displaying messages