- refactored client