switch added to calculate the  dog's  age