add addNewPet function to view