NEWTON, N.J. (CBS/AP) — A Sussex County man has admitted installing a hidden camera in his neighbor’s bathroom in hopes of videotaping a 13-year-old nude. Joseph Rebisz, of Newton, pleaded guilty Monday to criminal attempt/endangering by photographing or filming a child in a prohibited sexual act or in the simulation of such an act.

Under terms of a plea agreement, the 56-year-old will undergo an evaluation and register as a sex offender under Megan’s Law. He could face up to 3 years in prison.

Rebisz had a copy of his neighbor’s key to take care of the neighbor’s dogs when they were away. He placed the camera facing the shower.

The camera was discovered before Rebisz captured any images of the teen.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)