refactoring of clients