updated the server code