A 38-year-old Philadelphia man was sentenced Wednesday to 20 years in federal prison for secretly making videos of two naked preteen girls.

Roger Wallach had pleaded guilty in U.S. District Court in Philadelphia to nine counts of manufacturing or attempting to manufacture child pornography and one count of possession of child pornography.

Wallach admitted that he used the camera function on a Samsung smartwatch and a laptop webcam to record videos of the girls, ages 10 and 11, as they used a bathroom, undressed, and showered. The girls were the daughters of his live-in girlfriend, who discovered the videos and called the police.

In addition to his prison term, Judge Cynthia M. Rufe ordered Wallach to undergo 20 years of supervised release that includes sex-offender evaluation and treatment.