SCHENECTADY, N.Y. (NEWS10) — A Schenectady man has pleaded guilty to second-degree rape. According to the Schenectady County District Attorney’s Office, Corey Sheroka, 33, admitted to having sex with a girl less than 15 years old who was known to him.

The DA’s Office said this plea satisfies a six-count indictment, which included second-degree rape, three counts of first-degree disseminating indecent material to minors, forcible touching, and endangering the welfare of a child.

According to the DA’s Office, the investigation began when the child’s teacher noticed concerning text messages on her phone. At that time, the school social worker told police of their findings. The victim was interviewed at the Schenectady Child Advocacy Center where she disclosed the sexual assault. The DA’s Office said medical evidence and text messages confirmed her story.

Sheroka will reportedly be sentenced to seven years in prison with 10 years of parole and a 25-year full stay-away order of protection for the victim. He will also be required to register as a sex offender for life after his release from prison.