merge the server and client to one