adjust server code