Harry refactored code