client and server implementations