clientside refactoring