Transgender Americans who previously wrestled with the high cost of gender reassignment surgery may find relief now under the Affordable Care Act.

Before implementation of the Affordable Care Act, popularly known as Obamacare, transgender Americans struggled to find jobs that offered health insurance, according to Kaiser Health News. Plans available on the private market were expensive, and some consumers were denied coverage because insurance companies considered “gender identity disorder” a pre-existing condition.

Obamacare, however, prohibits health insurance providers from denying coverage because of pre-existing conditions. Section 1557 of the law also blocks companies from discriminating against transgender people.

Devin Payne, who was born a man, was able to undergo gender reassignment surgery because of the Affordable Care Act. Undergoing surgery without insurance, she said, would have been costly and difficult.

“It is not a simple, easy, magical surgery,” Payne told Kaiser Health News. “Trying to do this without insurance is a big risk. Things can go wrong … not having the money to pay for it would be awful.”

Payne qualified for subsidies through Covered California, the state’s health insurance marketplace, and signed up for a Blue Shield plan.

The plan costs $230 per month.

Under Obamacare, some insurance policies cover gender reassignment surgery, though patients must meet specific guidelines. Payne had to be diagnosed with gender identity disorder and “have an ‘expressed desire’ to live as a member of the opposite sex.”

Blue Shield covered some costs of the surgery, but not all. Payne recently received a bill for $17,000 of the total cost.

Peter Sprigg, senior fellow at the Family Research Council, said taxpayer dollars shouldn’t be used to pay for gender reassignment surgery. He told Kaiser Health News:

We would oppose sex change operations all together. But as a public policy issue, we would feel particularly strongly that taxpayers shouldn’t be asked to pay for it.

Oregon, Massachusetts, California and Vermont currently cover transgender medical services, including gender reassignment surgery, in state insurance programs. Under Medicaid, the states cover treatment for gender dysphoria, which can be treated only with medical care, according to the American Medical Association. Oregon and Massachusetts made the decision to cover the services this summer.

In May, the U.S. Department of Health and Human Services ended a 1981 ban on Medicare coverage for gender reassignment surgery. The ruling did not apply to Medicaid.