Climate change is threatening your favorite coffee. As heat, drought, and increasing pests start to limit where coffee beans can grow, the industry is struggling to adapt–but one startup is attempting to tackle the problem by reverse engineering a cup of coffee that can be made without coffee beans.

Farmers already report struggling with changes in temperature and longer droughts; when rains do come, it’s also now more likely to cause erosion and landslides. Arabica trees also suffer from pests like the coffee berry borer, which is spreading because of climate change. Other types of coffee also face challenges. A report from the International Center for Tropical Agriculture estimates that around half of the land now used for growing coffee won’t be able to grow it within around 30 years.

“We realized, holy crap, you know, coffee is actually in trouble–it’s at risk,” says Andy Kleisch, CEO of Atomo, a Seattle-based startup that is working to replicate the flavor and mouthfeel of coffee at a molecular level.

Kleisch started the company after a conversation with food scientist Jarret Stopforth, who was interested in eliminating the bitter taste of coffee. “He’s been a food scientist for 25 years, so anytime he drinks or eats anything, he’s always thinking to himself, How can I improve this and make it better?” Kleisch says. As they researched the idea, the pair recognized the environmental need as well.

The team studied research from coffee chemists about the compounds found in the drink; there are more than 1,000 compounds in a roasted bean, and 40 of those are critical for taste. Those chemical compounds can be found in other natural, plant-based ingredients. In the first experiments, Kleisch says, they realized that it would be possible to eventually re-create the flavor. By leaving out the acid that gives coffee its strong bitterness, they could also make a drink that didn’t need the addition of cream or sugar.

“Then we had to get creative–what other naturally derived ingredients can we use for the body to give it that mouthfeel, or how can we change it to a dark, blackish-brown color?” he says. They started with a product that is brewed as a liquid, but realized that they also had to re-create coffee grounds that could be used in a French press or drip machines. “You want your morning ritual to stay the same.” To make the correct texture, they’re experimenting with food waste such as watermelon seeds and the hulls from sunflower seeds.

In a small taste test on the University of Washington campus, 70% of students preferred Atomo’s “coffee” to Starbucks. The startup is now working with Mattson, a food and beverage innovation company, to perfect the formula before they bring it to market, initially selling directly to consumers. The team is currently crowdfunding on Kickstarter.