updated server.js for step 5