Did you need another reason to love dogs? Here’s one: Scientists have shown that pups like giving treats to their friends. 

Why do animals do nice things for each other? It’s called prosocial behavior or altruism, and it’s puzzled scientists for ages. There’s no evolutionary benefit to being generous, but we do it anyway, especially for our loved ones. But we’re hardly alone in our altruism. Rats, jackdaws, and chimpanzees all go out of their way to help their friends and family. Now, a new study shows that dogs do, too.

In a study involving 16 dogs published this week in Scientific Reports, researchers described their experimental setup: a treat dispenser that only worked when a dog pulled on a tray with its teeth. But there was a catch—the dog didn’t get to eat the food itself. Instead, the food was delivered to another dog on the other side of a partition. So the donor dog, as the scientists called it, had a choice: it could feed the other dog, or it could withhold food.

Once the donor dogs learned how to use the contraption, the researchers brought in the would-be snack recipients. Some were dogs the donors knew and liked; others were strangers. 

Time and time again, the donor dogs gave treats to their friends. And the donor dogs weren’t just pulling the tray for the heck of it; when the potential recipient was an unfamiliar dog, the donors were far less likely to dispense a treat.

Were the donors just freaked out by dogs they didn’t know? Nope. Before each test, the dogs had a moment to sniff the air and investigate each other. By treat time, both dogs were completely calm.

To double-check if the presence of stranger dogs was throwing off the donor dogs, the researchers reconfigured the dispenser after each test so that the donor dog would get its own treat for pulling on the tray. Even in the presence of unfamiliar dogs, the donors aced that test every time.

It wasn’t that the unknown dogs were a problem—the donor dogs just really wanted their friends to have treats.

The researchers aren't sure why this is the case. It may be that the donor dogs were hoping for a little quid pro quo—a treat in return. Or, they write, it's possible that "a simple form of empathy" drove the behavior; perhaps when donor dogs saw their pals happily snacking, it made them happy too. "The positive emotion experienced by partners when they receive a reward may have a positive effect on the donor," they say. 

So yeah, dogs are pretty much the greatest.