Male chicks are pretty much useless to the egg and broiler industry; they don’t produce eggs and their bodies don’t grow as large or as fast as female chickens. Consequently, hatcheries kill off their male chicks within hours of their birth, either suffocating them with gas or running them through a shredder to become animal feed.

Unsurprisingly, the death-by-grinder fate is a sticking point for animal rights activists and knowledgeable consumers, alike. But what if the sex of a chicken could be determined while it was still an embryo? That’s the question that has given rise to the world’s first no-kill egg carton label, now being sold at a Germany grocery store chain, reports Josie Le Blond at The Guardian.

Ludger Breloh, managing director of egg technology company Seleggt, worked on a four-year program to find a more sustainable solution to the cull of male chicks for the grocery chain Rewe Group. To do so, he pulled on the research of Almuth Einspanier at the University of Leipzig, who's discovered a hormone present in female eggs that can be tested at nine days, well within the 21-day incubation period of an egg.

A Dutch company called HatchTech developed a way to mass test for the hormone, estrone sulfate. The machine they came up with uses a laser to burn a tiny hole in an eggshell and then uses air pressure to push out a tiny drop of fluid for testing. The process takes approximately a second per egg, and allows male eggs to be pulled and disposed of before they hatch.

The no-kill eggs under the “Respeggt” brand that hit supermarkets in Berlin last month are from the first group of hens produced using this method. As production ramps up, the supermarket hopes to spread the brand to 5,500 other supermarkets in Germany next year.

In total, the process adds just a few cents to the average carton of eggs. "With the market readiness of the process presented today, Germany is a pioneer,” German agriculture minister Julia Klöckner says in a press release. “Male hatching eggs no longer need to be incubated and killed immediately after hatching.”

According to the release, Seleggt is currently developing a cost-neutral method to bring its technology to the poultry industry, and it hopes to have its sex-identification tech available to other hatcheries across Europe by 2020. But Breloh says determining the sex of the eggs is just a stop-gap solution. He says the bigger goal is to breed chickens in which both the females and males can be reared for market, eliminating the waste altogether.

Seleggt isn’t the only company seeking solutions. Dan Charles at NPR reports that Austin-based egg producer Vital Farms has teamed up with the Israeli company Novatrans to analyze gases leaking through the pores of an egg to identify its sex after just two days of incubation. That tech has yet to make it to market. A researcher at McGill University in Montreal is also pursuing another method of sex identification that involves light.

It’s hoped that one of the techniques will become viable in North America soon. Two years ago, Chad Gregory, president and CEO of the United Egg Producers—which represents about 95 percent of egg producers in the U.S.— set a goal of eliminating chick culling by 2020.

Breloh tells Le Blond at The Guardian that he’s happy other people are working on the problem. “Of course, there’s competition, but it’s positive in that it keeps us all focused on that goal," he says, which is ending chick culling for good.

Correction, 12/27/18: An earlier version of this story referred to male chicks as "XY chicks." The sex chromosomes for chickens, however, are Z and W, which would make them, in fact, "ZZ chicks."