Pitcher plants are carnivorous plants that lure unsuspecting insects into their digestive juices using foul smells. But first they have to find a good, stinky perfume to entice the animals in. Luckily, in nature there are plenty of things that might smell appetizing to insects, including animal droppings. But how to get the animals to cooperate?

Evolution comes in handy. Researchers write that they have found one type of pitcher plant with a unique shape, designed to look attractive to bats using sonar to echolocate. Bats find their way around by emitting tiny noises that bounce off objects. When a bat’s noise bounces off a certain part of the plant, called a reflector, it reflects back a loud, clear signal, telling the bat where to go (you can see the bat enter the plant in the gif above). The results are published in a new paper in Current Biology.

“With these structures, the plants are able to acoustically stand out from their environments so that bats can easily find them,” Michael Schöner, one of the authors said. “Moreover, the bats are clearly able to distinguish their plant partner from other plants that are similar in shape but lack the conspicuous reflector.”

But why would a bat want to go into the mouth of a pitcher plant? Unlike insects, the bat isn’t flying towards its doom. In previous studies the scientists found that the pitcher plant was the perfect shape for a bat to fly in and take a rest. The bat is too large to fall into the much of digestive juices and fecal offerings at the base of the plant. In this case, almost everyone wins. The plants get bat poop which helps attract food, and the bats get shelter. The insects, unfortunately, are out of luck.