A 31-year-old Illinois middle school teacher is facing a potentially lengthy jail sentence after she pleaded guilty to committing sex acts with two underage boys.

Lindsay Anderson, of Geneva, pleaded guilty late last week to one count of aggravated criminal sexual abuse and one count of criminal sexual assault for engaging in sexual activity with a 14-year-old and a 15-year-old student between 2013 and May 2015, according to court records obtained by Chicago’s Daily Herald.

Authorities say Anderson also showered her teenage victims with gifts and drugs before sexually molesting them.

“Ms. Anderson leveraged her position as a teacher to gain these victims’ trust and then selfishly took advantage of that trust,” Kane County State’s Attorney Joe McMahon told reporters on Monday. “As a teacher, she was in a position of authority and clearly knew that what she did was wrong and harmful to these children.”

Police began investigating Anderson in May 2015 after a parent suspected there had been an inappropriate relationship going on with the teacher and her son.

The parent said Anderson would drive him places and “buy him things,” according to the Herald.

Anderson’s 15-year-old victim told authorities that one time he smoked marijuana with the teacher in a park before she sexually assaulted him.

In a recorded statement with police, Anderson said she molested her 14-year-old student in the parking lot of a movie theater and said she sexually assaulted the boys “several times.”

During last week’s court hearing, Anderson entered a “blind” guilty plea, meaning that she pleaded guilty without making a deal with prosecutors. Her blind plea also means that the fate of her sentencing is solely in the hands of the judge.

Anderson is due back in court on December 6. She faces anywhere between four to 22 years in prison.

Many teachers charged with having inappropriate relationships with their students in the U.S. face lengthy prison sentences. In July, an Arizona teacher was sentenced to 20 years in prison for having sex with a 13-year-old student.

In that same month, an Islamic teacher was sentenced to ten years behind bars for sending pornography to a 15-year-old.