Refactored code to use the age method