merge server code