client refactoring in progress