Josh Wairi, 27, of Somerville, was arrested at his home on Thursday after an extensive investigation.

According to an affidavit by a Postal Inspector with the United States Postal Inspection Service, the investigation started in July 2013, after AOL reported an email exchange involving suspected child pornography.

Police were able to identify Wairi by linking the email address to his computer I.P. address. Investigators say they found evidence during a search that Wairi had traded and received hundreds of images and videos of child pornography.

During an interview with authorities, they say he admitted to downloading and trading videos and images of children being sexually exploited.

Wairi also admitted to secretly videotaping children changing in and out of clothes on more than one occasion, and to setting up a hidden video camera in a locker room in order to videotape children changing, according to authorities.

It’s unclear where those alleged incidents took place.

“I feel shocked and betrayed,” Cambridge School Superintendent Jeffrey Young said. “Families put tremendous trust in sending their children to school every day.”

Young says the school system conducted background checks as they do with all employees and there were no red flags. “If we had gotten any inkling of any such thing he never would have been appointed in the first place,” he said. “At this point there’s no specific evidence suggesting anything happened in the school building or during the school day.”

Wairi also worked at two Somerville schools in the past. He worked as a student teacher at the John F. Kennedy School during the 2008-2009 school year and as a fifth and sixth grade teacher at The Arthur D. Healy school from 2009-2012.

He also allegedly told officials that he has posted an advertisement on Craigslist offering his babysitting services.

WBZ-TV’s Beth Germano contributed to this report.MORE LOCAL NEWS FROM CBS BOSTON