merge client and server