added code to the app.js file and fixed some routing