A man who used a fake penis to dispense phony urine for a drug test has been sentenced to three years on probation.

The 42-year-old man was arrested in April 2017 after his probation officer caught him trying to produce a fake sample for a required drug test in the upstate New York community of Queensbury. The officer accompanied the man to the bathroom and noticed something odd about the delivery process.

The Glens Falls Post-Star reports the man pleaded guilty to felony tampering with evidence last January but was allowed to substitute a misdemeanor plea last week. The drug test was required because he was on probation for marijuana possession.

The Warren County probation director says fake penises and synthetic urine are commonly sold online for evading drug tests.