Pets are smarter than we give them credit for