Dogs are smarter than you think