Madeline Marx, 23, asked for exams to test whether she can plead not guilty by reason of insanity to charges of sexual battery

A 23-year-old substitute teacher from Ohio who allegedly had a sexual relationship with two students is seeking an insanity plea.

Madeline Marx has been indicted on two counts of sexual battery over claims she performed off-campus sex acts on two 11th grade pupils during her two years as a substitute teacher at Kettering Fairmont High School.

Marx sobbed in court on Wednesday as she requested medical examinations to assess whether she can enter a plea of not guilty by reason of insanity, Fox 45 Now reported.

Clutching tissues as she stood in the dock, she was told by Judge Steven Dankof 'hang in there, you'll get through this, you'll be all right'.

Marx is accused of having intercourse with a 16-year-old boy on September 21 in the parking lot of an apartment building an eight minute drive from the school.

She is also accused of performing oral sex on a 17-year-old in the parking lot of a Big Lots furniture store around five minutes away from the school on July 19.

Marx has also been accused of sending nude photos to one of the teens.

She was arrested at the school after students went to the principal saying they were concerned about her relationships with pupils.

Scroll down for video

The former substitute teacher from Kettering High School, Ohio, wept and dabbed her cheeks as she left the courtoom

Marx sobbed and clutched tissues as she stood in the dock on Wednesday

A friend wrapped her arm around Marx as she sat in the public gallery and waited for her appearance in front of the judge

Marx, who has been a substitute in the district for two years, was arrested (above) at the high school on November 8

Kettering police Lt. Mike Gabrielson said Marx was arrested three hours later after detectives found probable cause.

Marx has now been released on bond and ordered not to contact the two students, according to WHIO.

She originally pleaded not guilty.

'We became aware (Marx) was possibly involved with inappropriate activities with a juvenile,' Kettering Superintendent Scott Inskeep said.

'When we become aware of them then we will remove those people and not have them around our students.'

Marx had been given a four year teaching license last year that enabled her to teach grades K-12, WHIO reports.

Police said Marx admitted to sending several nude photos to one of the students via Snapchat and Instagram.

Marx graduated last year from the University of Dayton and dropped out of a fall 2013 sexual ethics class, WHIO says.

She graduated from the nearby Chaminade Julienne Catholic High School in 2012.