Mothers can adjust the sex of their unborn children in response to the environment where they live, according to new research.

The study, published in the latest Proceedings of the Royal Society B, finds that mothers exert far more control than fathers do over whether or not the couple has a son or daughter. The goal is to improve the child’s survival.

“It seems likely that when there are large and predictable costs associated with producing and/or rearing either sons or daughters in a given environment, females should bias offspring sex ratios to produce the sex that will perform best in the given environment,” co-author Sarah Pryke told Discovery News.

Read more at Discover.