refactorying PetActivity state change
refactorying PetActivity