working on server code