A 19-year-old New Jersey man accused of viewing child pornography tried to escape police and destroy computer evidence with powerful magnets inside his shoes, state police said Monday.

Detectives were at the Piscataway home of Hong Yu Wang last Thursday interviewing him in an investigation into child pornography distribution when Wang became uncooperative and attempted to flee the detectives, said police.

Wang was subdued, and police discovered he had hidden powerful magnets inside of both shoes. The magnets could have been used to erase computer memory, authorities said.

When detectives executed a court-authorized search warrant, they discovered child pornography on computers belonging to Wang.

He was charged with endangering the welfare of a child and obstruction. He remains in Middlesex County Jail pending a bail hearing, according to authorities.

It wasn't clear if he had an attorney.