db client refactoring