We all know that dogs can learn to respond to human words, but it’s not always clear what’s happening in a dog’s brain when they hear and recognize words like “cookie” and “fetch.” Do they have to rely on other clues, like gestures, to figure out what we mean by that word? Do they picture a dog biscuit when you say “cookie,” or just the sensation of eating? In a new study, scientists from Emory University and the New College of Florida tried to get to the bottom of this question by training dogs to associate certain objects with words like “blue” and “duck,” then using fMRI brain scanners to see what was happening in the dogs’ heads when they heard that word.

The study, published in Frontiers in Neuroscience, examined the brains of 12 different dogs of various breeds (you can see them below) that had been trained to associate two different objects with random words like “duck,” “blue,” and “beach ball.” Those two objects, which were different for each dog, were brought by the dogs’ owners from home or chosen from a selection of dog toys the researchers compiled. One object had to be soft, like a stuffed animal, and the other one had to be something hard, like a rubber toy or squeaky toy, to make sure the dogs could clearly distinguish between the two. The dogs were trained for several months to associate these objects with their specific assigned words and to fetch them on command.

Then, they went into the fMRI machine, where they had been trained to sit quietly during scanning. The researchers had the dogs lie in the machine while their owners stood in front of them, saying the designated name for the toys and showing them the objects. To see how the dogs responded to unknown words, they also held up new objects, like a hat, and referred to them by gibberish words.

Prichard et al., Frontiers in Neuroscience (2018]

The results suggest that dogs can, in fact, discriminate between words they know and novel words. While not all the dogs showed the same neural response, they showed activation in different regions of their brains when hearing the familiar word versus the novel one.

Some of the dogs showed evidence of a greater neural response in the parietotemporal cortex, an area of the dog brain believed to be similar to the human angular gyrus, the region of the brain that allows us to process the words we hear and read. Others showed more neural activity in other regions of the brain. These differences might be due to the fact that the study used dogs of different sizes and breeds, which could mean differences in their abilities.

The dogs did show a surprising trend in their brains’ response to new words. “We expected to see that dogs neurally discriminate between words that they know and words that they don’t,” lead author Ashley Prichard of Emory University said in a press release. “What's surprising is that the result is opposite to that of research on humans—people typically show greater neural activation for known words than novel words." This could be because the dogs were trying extra hard to understand what their owners were saying.

The results don’t prove that talking to your dog is the best way to get its attention, though—it just means that they may really know what's coming when you say, "Want a cookie?"