modified and tested server.js