1.Refactored code