Made the functions more flewible

To allow me to vary the animals array. Still can't get the call back to work