refactoring wave