Like a lot of birds, superb fairy wrens of Australia have a problem: Cuckoos lay their eggs in the fairy wrens’ nests. This is called brood parasitism, and it’s how cuckoos manage to have their baby birds raised well without any effort on their part. They leave the messy parts of parenthood to other birds.

Those other birds, though, don’t want to spend their time and effort raising someone else’s kid, especially when that kid might push out the chicks that actually belong in the nest. But the fairy wrens don’t prevent Horsfield’s bronze cuckoos from laying eggs in their nests because the cuckoos look too much like Accipiter hawks, which prey on fairy wrens. Make the wrong call when trying to stop the invader and the fairy wren might end up dead.

Superb fairy wrens have come up with another solution: Mama birds sing to their eggs. This incubation call teaches her babies a password. After they’ve hatched, the babies repeat that password as a begging call, and that tells mom to feed her children. The closer the begging call is to the incubation call, the more food the babies receive. This system works because incubating cuckoos fail to learn the password (scientists aren’t sure why, though).

Now Sonia Kleindorfer and her colleagues at Flinders University in Australia have found that moms that are more aware of the cuckoo threat are better teachers to their incubating young. Their study was published May 6 in Biology Letters.

The researchers conducted an experiment in which they played the songs of either the bronze-cuckoos or a control, the striated thornbill. Mama fairy wrens that heard the cuckoo calls increased the rate at which they made their incubation calls, telling their babies the important food password over and over, more often than those moms that heard the thornbill calls.

The mama birds that heard the cuckoo calls were led to believe that there were cuckoos nearby and that the threat of brood parasitism was greater. Therefore, it was more important that the wrens teach their young the password because there’s a greater chance they’ll need to know it, the researchers suggest­­­.

Female fairy wrens aren’t always such great teachers because there’s a cost to it. When they make that incubation call more often, their risk of getting eaten by something else goes up. So mama is only going to take that risk when she knows it’s worth it.