updating main and server.js