adding tests
refactored client unit tests