adding server code