Step 3 - refactoring