client code refactoring