added a common parent class to client and server