merge pet prior and state
Merge branch 'last_good_pet'