merging client and server