Celebrities like John Legend and Chrissy Teigen who are using in vitro fertilization to choose the sex of their baby have reignited controversy around this reproductive technology.

Almost since its beginning in the 1970s, in vitro fertilization (IVF) has been surrounded by controversy. However, many concerns faded away as more children were born healthy with the help of IVF.

But a new controversy has arisen since model and television host Chrissy Teigen announced that she and her husband, singer John Legend, used IVF to choose the sex of their child.

“Not only am I having a girl,” Teigen told People, “but I picked the girl from her little embryo. I picked her and was like, ‘Let’s put in the girl.’”

Read More: The Basics of In Vitro Fertilization »

Selecting the sex of a baby is not as difficult as it might seem, especially with recent advances in IVF.

During IVF, several eggs are removed from a woman’s body. Then, in a laboratory, the eggs are fertilized with sperm to create embryos that can be implanted into a woman’s uterus.

Before the eggs are implanted, a doctor can remove a single cell from the embryo to look at its chromosomes. This is known as preimplantation genetic diagnosis (PGD).

PGD is used to check the embryo for serious or fatal genetic disorders and can also reveal the embryo’s sex.

This makes it possible for potential parents to say “boy” or “girl” before an embryo is implanted.

Read More: More Cycles Equals More Success in IVF »

The United States has no restrictions on IVF for sex selection. However, some countries have banned its use except when there is a risk of a sex-linked genetic disorder.

In spite of its availability, the use of sex selection is limited. This might be due to its high price tag — IVF with PGD costs between $15,000 and $25,000 per cycle.

“The number of patients, and particularly the number of offspring that are born following IVF and PGD for nonmedical sex selection, without any other indication, is very, very low,” Judith Daar, J.D., a professor of law at Whittier Law School, told Healthline.

Exactly how low is not clear. Clinics are not required to report the reasons couples use IVF.