add client and server code