refactored client with helpers