Credit: Alexander Tamargo/Getty Images for Sports Illustrated

Chrissy Teigen and John Legend didn’t have to wait until their 20-week ultrasound to learn the gender of their unborn baby. In an interview with People published Wednesday, February 24, the pregnant model — who is expecting her first child this spring — revealed that she chose to have a daughter while undergoing in vitro fertilization. 

“I’ve made this decision,” the author of the cookbook Cravings told the mag. “Not only am I having a girl, but I picked the girl from her little embryo. I picked her and I was like, ‘Let’s put in the girl.'”

The model and her musician husband aren’t the only famous names who selected the gender of their child. Girls Gone Wild creator Joe Francis and his girlfriend, Abbey Wilson, also used IVF with preimplantation genetic diagnosis (PGD) in 2014 to ensure they had twin girls. They couple welcomed Alexandria and Athena in October that year.

So how does the test work?

“PGD is the process of taking a few cells out of a fully grown embryo,” Shahin Ghadir, a double-board-certified doctor in obstetrics and gynecology, tells Us. “These cells are then tested and provide the 46 chromosomes of the embryo. Two of them, the X and Y, represent gender.”

But first, IVF needs to take place. “Once the sperm and egg have been introduced, an embryo is formed,” explains the doctor, who has not worked with either celebrity couple. “The embryo is left to grow for approximately five to six days, and then a small section of the back side of the embryo is biopsied and a couple cells are removed.”

Then, between 24 hours and 10 days later, the “complete 46-chromosome genetic reading of the embryo” will be finished, and the gender determined, says Ghadir.

According to the doctor, the ability to gender-select embryos has been available for about 10 years. The most advanced method is called "new generation sequencing," and has been available for about a year.

But preimplantation isn’t just about gender selection.

“PGD is of significant value in verifying which embryos are healthy genetically and which embryos are abnormal, that would lead to miscarriage or a genetically abnormal child,” says Ghadir. “Additionally, PGD also increases pregnancy rate for certain patients and can help women with recurring pregnancy loss, ensuring them that a healthy embryo has been placed into their uterus."

Want stories like these delivered straight to your inbox? Sign up now for the Us Weekly newsletter!