server and client class