Plants look so helpless and innocent, leafing about in their fields and lawns, but mess with the wrong one and you could find yourself in a world of pain. Scientists say some plants can identify their herbivore attackers—and that the plants use that information to call in bigger, herbivore-killing bugs. A report on the findings was published in the journal New Phytologist.

The arms race between plants and plant-eaters is both brutal and surprisingly advanced. To combat opponents that can bite, pinch, fly, crawl, and run, plants have developed an impressive suite of chemical weapons. Some of these weapons are poison; others simply make the plants taste awful. And then there are the wasp calls. When under attack, some plants emit volatile gases that act almost like dog whistles, silently summoning gangs of parasitic wasps to take care of the offending insect.

Even without the benefit of external sensory organs, plants can tell when they’re being assaulted. Previous studies have found that some plants can sense their attackers’ odors in the air. Others ‘listen’ for the chemical distress calls emitted by nearby plants. Still others pick up on chemicals in a slobbering bug’s saliva.

So lots of plants can tell when they’re being eaten, but can they tell who’s doing the eating? To find out, researchers paired field mustard (Brassica rapa) plants with 12 different herbivore species, including caterpillars, aphids, and a slug. Some species were gnawers and chewers, while others fed via sucking. Some were local and some were unfamiliar. The researchers covered each plant/pest pair with a plastic bag to collect any gases the plants emitted, then tested the gas.

The plants were having none of it. They fought back admirably against all 12 attackers, producing different compounds for each species in order to summon the right species of wasp. The gases all contained the same chemicals; the plants simply adjusted the ratio of chemicals to customize each cocktail. They even concocted successful blends to dispose of species they’d never met before.

Lead author Nicole van Dam says the findings are “spectacular proof” of plants’ hidden capabilities. “The plants may not have a nervous system, eyes, ears, or mouths,” she said in a statement, “but they are capable of determining who is attacking them. What I find truly amazing is that they’re even capable of distinguishing between a native and an exotic herbivore.”