Food-waste activists think perfect-looking apples and potatoes should share the spotlight with their bruised brethren.

A 17-year-old New York City student recently developed an award-winning app that aims to cut down on food waste by matching New York City restaurants and food vendors with the imperfect-looking produce that is sometimes hard for farmers to sell.

Priya Mittal, a rising senior at The Dalton School in New York, got the idea for the app while visiting a farmer’s market in the city’s Union Square neighborhood in 2015. She had long been interested in food, restaurants and the farm-to-table movement, and wondered what happened to produce that wasn’t sold and languished at the bottom of farmers’ crates.

The statistics shocked her: Americans throw out about $165 billion worth of food every year, according to the Natural Resources Defense Council, a New York-based nonprofit.

A large portion of that waste happens once consumers have already brought food home, but food is lost during the production process also; some 23% of fruits and vegetables are lost during production, handling and storage, before ever getting to the retail stage, according to the Food and Agriculture Organization, a New York-based nonprofit that the NRDC cited in a report on food waste.

About 6 billion pounds of fresh produce go unharvested or unsold each year, according to an estimate by Feeding America, a nonprofit based in Chicago. Some of those losses happen because of pests, disease, weather, or labor shortages that leave some crops unharvested, according to the NRDC.

But “ugly” produce also plays a role, the NRDC said, because some farm workers are trained to not even pick produce that doesn’t meet certain standards for shape, size, color and ripeness. A cucumber farmer said fewer than half of his vegetables leave the farm, but 75% of the cucumbers are actually edible, according to the NRDC. Another farmer of citrus, stone fruit and grapes told the NRDC that 20% to 50% of his produce isn’t “marketable,” but it is edible.

“It’s not economically viable for farms to have to throw away so much time and money’s worth of produce, just because they know it won’t be bought,” Mittal said.

Priya Mittal won a New York City award for an app that aims to reduce food waste. Courtesy of Young Innovators to Watch

Mittal’s iOS app, GroGreen, allows restaurants and food vendors the option of buying produce that would otherwise be wasted. Although everyday consumers might not pick up an “ugly” fruit or vegetable, restaurants can use it as ingredients in meals.

Mittal won an award called Young Innovators to Watch in July for the idea. She coded the app, which is currently in the prototype stage, after taking a computer science class in 8th grade and continuing to learn on her own.

She hopes to formally launch the app this fall and plans to maintain the company throughout college. She also plans to develop a website, which could help farmers and restaurants who aren’t as tech-savvy, she said. She already has some interest from restaurant partners, including Bruno Pizza and The Fat Radish, which are both in New York, she said.

Finding farming partners can be more challenging, Mittal said. Mittal has been approaching farmers at farmer’s markets in the city to try to sell them on the idea, she said. Right now she doesn’t have the capability to pick up the ugly produce at the upstate New York farms where it’s grown, so GroGreen will transport the produce from farmer’s markets in the city to restaurants. Eventually Mittal hopes to add delivery trucks that will go directly to farms to get the imperfect produce.

Mittal said GroGreen would make a 40% commission on sales, and restaurants would pay a delivery fee. Once she expands throughout the New York area, she’s hoping to take GroGreen global.

Mittal isn’t alone in trying to solve the “ugly” food waste problem.

Several U.S. retailers have begun to sell “ugly” fruits and vegetables in response to customers’ concerns about produce that may be discarded when it doesn’t meet retailers’ standards.

Wal-Mart WMT, +1.31% announced in July 2016 it would sell a brand of apples called “I’m Perfect” at 300 stores in Florida. The apples have some cosmetic problems, such as being misshapen or having blemishes on their skin, but are nutritionally the same as other apples and are sold at a discount. At the time Wal-Mart launched the program, a 5-pound bag of “I’m Perfect” Granny Smith apples cost $4.93, whereas it cost $4.74 to buy just a 3-pound bag of Granny Smiths of the better-looking variety. Wal-mart stores have also been selling “Spuglies,” a brand of misshapen potatoes from a supplier in Texas, since April and began selling boxes of in-season “wonky” vegetables at a discounted price at its U.K. retailer, Asda, in 2015.

Whole Foods US:WFM is working with the startup Imperfect Produce, which sells imperfect-looking fruits and vegetables, to sell those products at a discount in five Bay Area stores; those stores have seen strong sales for the products. At its Williamsburg store in Brooklyn, New York, Whole Foods is working with a company called Gotham Greens to sell “ugly greens,” or greens and herbs that are imperfect on the outside and will also sell discounted “imperfect” produce from New Jersey.

What marriage-phobic millennials mean for the wedding-ring industry

The supermarket chain Giant Eagle has also announced plans for a pilot program for selling “ugly” or “imperfect” produce, according to NPR. Giant Eagle did not respond to MarketWatch’s request for comment on the status of the program. And the West Coast-based grocer Raley’s also tried a partnership with Imperfect Produce, which they later discontinued, NPR reported.

Activists target “ugly produce” to reduce food waste

Jordan Figueiredo, whose day job in California is working on recycling and composting for his community, has tried to fight against food waste since 2014, when he hosted a forum on the topic. He eventually created the Ugly Fruit and Vegetable Campaign, which he has used to petition several large stores, including Whole Foods and Wal-Mart, to start selling the imperfect produce.

He also sells T-shirts and bags that feature the produce and has several social media accounts devoted to the cause. He said his goal is not to shame people who buy “perfect” produce but to celebrate the imperfect versions. “It resonates with a lot of people once you explain it to them,” he said. “It’s really visual.”

When retailers have high standards for produce that looks consistent and cosmetically perfect, the burden can fall on growers to either meet those standards or be stuck with leftovers, said Marvin Pritts, a horticulture professor at Cornell University. “A supermarket or buyer has all the power. If they don’t like what they see, they can say, ‘No thank you,’” Pritts said. “Anybody who’s tried to grow fruits and vegetables themselves knows they won’t all come out the same.”

At that point, the grower decides what to do with the excess, a Wal-Mart spokesman said; some growers Wal-Mart works with decide on their own to use them for other products, such as jam or applesauce. Pritts said seeing imperfect produce in stores could be educational for consumers. When local farmers grow produce and sell it in their own communities, it’s not uniform, and consumers in big cities shouldn’t expect it to be.

In fact, for consumers who are interested in buying local produce when shopping at farmers markets, “imperfections” can be a good signal that it actually was grown by a small-scale, local farmer and didn’t come out of the industrial food system, said Marcy Coburn, the executive director of the Center for Urban Education About Sustainable Agriculture, which hosts farmers markets in San Francisco and Oakland, Calif.

Some supermarkets are fighting waste

There are steps in the production process that consumers never see, a Wal-Mart spokesman said. While “ugly” produce programs provide one option for growers who have imperfect-looking produce, there are other options for using it as well, including slicing up imperfect fruit for frozen-fruit bags, or using produce such as sweet potatoes to make baked goods, he said. Wal-Mart already does this; the store has used more than 2 million California sweet potatoes for its popular pies, he said.

Whole Foods also uses imperfect produce for its prepared foods, juice and smoothie bar, has in-store composting programs and works with nonprofits and food banks in local communities, a spokeswoman said.

Figueiredo said he was disappointed that Wal-Mart hasn’t explicitly said the “ugly” produce programs will be offered year-round. A Wal-Mart spokesman said now that consumers may be more familiar with the “imperfect” produce concept from seeing the “Spuglies” and “I’m Perfect” apples at stores, Wal-Mart could expand the programs in the future if “those opportunities exist,” he said. But the “ugly” produce campaigns can only work as long as growers have the supply and consumers actually buy the product, the Wal-Mart spokesman said.

What consumers should do

Although some food in the U.S. is wasted during the production process, consumers waste more than those companies do across all food categories (including produce, grains, dairy and meat) except fats and oils, according to the United States Department of Agriculture’s Economic Research Service. (The ERS notes that some of the “loss” happening at consumers’ homes may be due to food preparation, such as removing the bones from steak).

The ERS estimated that in 2010, each person in the U.S. wasted about 290 pounds of food, adding up to $371 per person. Consumers waste about 18 billion pounds of vegetables to retailers’ 7 billion pounds a year, the ERS found; they waste about 13 billion pounds of fruit, to retailers’ 6 billion.

One factor is confusion surrounding expiration dates, said Jeanine Bentley, a social science analyst at the ERS. Consumers err on the side of caution when they are unsure if food is expired and end up throwing it away prematurely. More than 90% of Americans may be prematurely throwing food away because of misinterpreting expiration dates, according to a 2013 study by Harvard Law School’s Food Law and Policy Clinic and the NRDC.

See also: The best ways to donate to food banks

There are some surprisingly simple things everyone can do to prevent waste. For instance, consumers should consider immediately freezing a portion of fresh fruit they can use later, either defrosted or still-frozen, for smoothies, Bentley said. Shoppers also shouldn’t be tempted by deals that would cause them to overbuy, said LaVonna Blair Lewis, a professor of public policy at the University of Southern California. She suggested speaking to local food banks and other organizations to see if there is a way individuals can donate food. (Although many food banks find it easier to receive donations in cash.)

Cornell’s Pritts said he sees a future for the “ugly” food programs, particularly if retailers promote the environmental benefits of using imperfect food, rather than throwing it out. “It’s not just wasting of food and throwing it out, but how much water was involved in growing this, the energy in transporting it from, say, California to New York, and how much fertilizer was used to grow it,” he said. “We’re just going to throw it out?”

(This story was updated on Aug. 4, 2017.)