NUTLEY, N.J. (PIX11) — Parents in Nutley are still trying to wrap their heads around disturbing allegations being made against a longtime substitute teacher who was charged with several counts of child endangerment and one count of lewdness for incidents that police said happened inside the classroom while he was teaching.

Nutley police arrested 58-year-old Richard Dunn on Tuesday after an investigation tied him to at least two separate incidents. The first incident that was reported to authorities occurred on March 11 at Nutley High School. An investigation later uncovered a second incident which is said to have happened at a middle school on Feb 1.

While police did not provide details about the behavior they are calling “inappropriate,” parents PIX11 News spoke to claim they were told by students inside a media class that Dunn was masturbating at his desk. Video of the incident was widely shared on social media, causing a firestorm with parents online.

The clip also became part of the investigation.

In a statement announcing Dunn’s arrest, Nutley’s Public Safety Director insists authorities acted quickly saying “protecting the children, and the residents of this community is our number one concern. When police are called upon to investigate allegations as serious as the ones reported last week, we prioritize our efforts to ensure no one is at risk.”

It remains unclear if the Nutley School District was aware of that first alleged incident that happened last month, possibly explaining why Dunn was allowed to return for duty last week. In a statement to PIX11, a district spokesperson said it “will provide counseling and support services for students and staff, as needed, throughout the district.”