move server code