A man convicted of taking video of girls in a Janesville park restroom in 2014 pleaded guilty in a similar incident in Rock County Court on Tuesday.

Joshua L. Miller, 28, of 317 E. Court St. No. 1, Janesville, pleaded guilty to a charge of attempt to capture an intimate representation of someone under age 18 as a repeat offender.

Judge Karl Hanson dismissed a related charge of disorderly conduct and set sentencing for Jan. 3

Miller was arrested June 20 at the Janesville Mall after a mother told police a man tried to grab her daughter’s leg by reaching under a bathroom stall and tried to record or photograph her under the stall with a cellphone.

Janesville police arrested Miller in June 2014 after a parent reported a man had been in the women’s bathroom stall near the Palmer Park wading pool in Janesville for about three hours.

Police later found two videos of partially clothed young children in the bathroom on Miller’s smartphone.

Miller was convicted in January 2016 of two counts of capturing an image of nudity. Judge Michael Haakenson sentenced him to four years of probation with 120 days in jail, according to online court records.

As part of his probation, Miller was required to complete psychiatric, alcohol, drug and sex-offender evaluations and complete recommended treatment.

Miller’s probation was revoked after his arrest last summer, and he was sentenced to three years in prison and four years of extended supervision, records show.