refactoring client
refactoring