getAge function fix