example refactoring