updated server.js to work with new syntax