adding server.js logic