added some functions to animal class