THE day a girl fainted from hunger was the final straw for Emmanuel George, the principal of Democracy Prep charter school in Harlem. She had refused to eat the “nasty food” served at his school. Her distaste was shared widely: many went hungry, and those who did eat mostly chose junk food. So in January Mr George switched to a supplier of healthy lunches called Revolution Foods. Since then the proportion of children choosing to accept free meals has gone from less than half to over 85%. Visits to the school nurse plummeted, and complaints of stomach-ache and headaches have almost vanished. Teachers say everyone works better in the afternoons.

Everyone from Michelle Obama to Jamie Oliver is trying to improve children’s diets, but doing so has proved difficult. It is, then, particularly interesting that a solution is emerging from the private sector. Revolution Foods, which is based in Oakland, California, serves 1m meals a week in nearly 1,000 schools across America. Most of its customers are public schools.

Despite a recent upgrade to the federal health standards (and funding) of school dinners, most are still made rather like airline food. Meals are put together in large processing centres, packaged, sometimes frozen, and then shipped across the country. When they arrive, the lunches are reheated in “retherm ovens” or warmers. This is certainly cheap, but does nothing for taste, freshness or nutrition.

Kristin Groos Richmond, co-founder of Revolution Foods, says despite a $16 billion market for food in schools, she felt there was no good way of delivering healthy meals. Instead she created a school-dinners company that used healthy and locally produced food with an emphasis on using children to design, and test, the meals. Something seems to be working: the company recently won a contract to serve food to 114 schools in the San Francisco Unified School District, and subsequently the proportion of children who chose to eat the free meals jumped by 12%.

None of the fare offered by Revolution contains junk-food staples such as high-fructose corn syrup or transfats. It is hormone- and antibiotic- free, and sometimes organic. Avoiding use of the deep-fat fryer has been hard. When Ms Groos Richmond began working with Washington schools she was asked to provide a chicken wing. It took over 1,000 attempts (along with tastings and focus groups) to create a child-approved baked chicken wing infused with a spicy sauce.

According to the company, the keys to winning children over to healthier foods are good presentation and trust. As children learn that the food tastes good, they become willing to try novelties such as lima beans. But Revolution Foods also receives daily reports on what is not being eaten. If necessary it will send someone in to promote particular foods, or create signs, in order to boost demand. This happened recently when its cauliflower florets were being rejected.

Healthy meals do cost more, though. For Revolution Foods to represent a challenge to the established system it would need to be making a profit, and it is not, although some of its regions are. The company says its rapid expansion means that it is not expecting to make money yet. (It was the second-fastest-growing inner-city company in 2012 according to the Initiative for a Competitive Inner City, a non-profit strategy group.)

On the day The Economist visited Democracy Prep, pupils had a choice between macaroni cheese (the real kind) and baked beans, or chicken pasta salad. Dessert was yogurt or whole-grain crackers. The menu also included sweetcorn and an orange. Little was left on the plates. A nutritionist from the company went from table to table explaining portion and serving size with props, showing the children that they need to eat four to six baseballs of vegetables a day. The pupils said that hamburgers and, surprisingly, the chicken Caesar salad were their favourite items on the menu. As ever, the proof of the pudding is in the eating.