refactored client class design