Recent research reveals a startling fact about bee populations in the United States: Where they are needed the most is also where they are disappearing fastest.

“This study provides the first national picture of wild bees and their impacts on pollination,” says Taylor Ricketts of the University of Vermont in a release. Ricketts spoke earlier this week at a panel of the American Association for the Advancement of Science annual meetings. He announced the creation of a new application for farmers to suggest changes to their practices that will help bees and their bottom line.

It seems desperately needed. Wild bee populations declined in 23 percent of the contiguous U.S. by area between 2008 and 2013, according to an analysis by Ricketts and his team, first published in late 2015 in the Proceedings of the National Academy of Sciences.

Red zones show where wild bee populations are declining while demand for them rises.

That study identified 139 counties where wild pollinators are in decline but demand for them is on the rise. Particularly troubling is the concentration of problem areas in the country’s most important food producing regions, including California’s Central Valley, the Midwest corn belt, and the Mississippi River valley. Places that grow crops that are highly dependent on wild pollinators — including almonds, blueberries, and apples — are especially at risk.

This exposes an ironic tradeoff — agricultural expansion in bee-dependent crops appears to harm the very pollinators these plants need to thrive.

But it doesn’t have to be that way, Ricketts contends, and that’s where his app comes in. The software helps farmers analyze and costs and benefits of certain bee-friendly farm adaptations, like planting wildflowers, installing windbreaks, or renting honeybees.

Ricketts et al. produced the first national map of bee declines in 2015. PNAS

There’s no reason that bees and commercial agriculture shouldn’t live in harmony — indeed they are natural partners. But some widespread practices of industrial agriculture, like mono-cropping and pesticide use, hurt bees, and in the long run, hurt crop yields, too.

“The good news is we now know where to focus conservation efforts, and largely know what bees need, habitat-wise, so there is hope for preserving wild bees,” says Ricketts.