Refactoring example