refactoring abstract classes
refactoring to client factory