Example refactored