A former teacher in Alabama is fighting for her right to have sex with students.

Charli Jones Parker, 31, was convicted of having intercourse with two male 16-year-old students while she was a teacher at Pickens Academy. Now she wants her case overturned, claiming that a law prohibiting sex with students is unconstitutional, according to Tuscaloosa News.

Her appeal comes after a Morgan County Circuit Court judge ruled in August that the law violated an equal protection clause which affords teachers the same treatment in court as other professions.

Parker’s attorney argued in a brief filed Tuesday that her conviction should be appealed on the same grounds.

The law in question prohibits school employees from having sex with students under the age of 19, regardless of where the student is enrolled.

“Alabama law does not make it a crime for members of other occupations to have consensual sex with 16-, 17- and 18-year-olds, even when there is a position of trust or authority,” said attorney Virginia Buck, according to the newspaper.

In court filings, Buck gave a hypothetical example in which a school janitor could go on spring break and have sex with a teen girl who was 16, and he would be violating the law. On the other hand, “a 65-year-old doctor, minister, therapist, or attorney is not subject to criminal liability in Alabama for having consensual sex with a 16-year-old,” she said.

The age of consent in Alabama is 16.

“School employees have been unfairly singled out and are being sent to prison for something that, at most, might cost people their job or their license in any other profession,” Buck said.

Parker pleaded guilty in August to having sex with the teens, including more than a dozen times with one boy between October 2014 and March 2016. She was sentenced to three years in prison.

If her conviction is overturned, the ruling could possibly benefit her husband, James Franklin Parker III. The 33-year-old also pleaded guilty to sexual contact with a former student and is set to be sentenced in June. He has not appealed his case.