Egg farms have two major targets – producing a large number of eggs and growing enough egg-laying hens to do that. So when some of the eggs kept to hatch crack open with male chickens, the babies are simply ground up.

But now, United Egg Producers, which represents 95% of egg producers in America has announced that it plans to "eliminate the culling of male chicks at egg laying hen hatcheries by 2020". Instead, the gender of the chicken will be determined while it is still in egg form, using a new technology.

"United Egg Producers is proud to have worked with The Humane League on this commitment to support the elimination of day old male chick culling after hatch for the laying industry," said Chad Gregory, president and CEO of United Egg Producers. "We are aware that there are a number of international research initiatives underway in this area, and we encourage the development of an alternative… that is commercially available and economically feasible."

Currently millions of male one-day-old chicks are killed, either by being ground up in a wood-chipper styled machine or by their spinal cords being severed. The practice is rampant in egg farms across the world since there is no use for the male chicks.

"Egg layers are bred to be egg laying machines who can pump out hundreds of eggs each year," David Coman-Hidy, executive director of The Humane League told The Huffington Post in an email. "They're expected to live for approximately one year, typically confined to a tiny cage. On the other hand, broilers are bred to be grotesquely large, growing to a huge size within one month — this is like having a toddler that weighs hundreds of pounds — when they are slaughtered. This leaves the male laying breed as the odd man out — too small to be really profitable to raise for meat and unable to lay eggs."

The new technology — ovo-sexing — proposed by UEP will allow for farms to detect the DNA of a chicken embryo while it is in egg form and instead of being destroyed, the male eggs can be put into the egg supply chain for use in vaccinations or pet food.

Referring to the decision as "historic" Coman-Hidy said, "We are proud to have played such a pivotal role in doing away with this barbaric convention and to help pave the way to a more humane future. It is clear that chick culling will soon be a thing of the past in the United States."