Updated

A sex offender who managed to get a job with the U.S. Census Bureau until an astute New Jersey mom recognized him from an online offender registry was sentenced Friday to three years in prison.

The 36-month sentence for Frank Kuni was one month short of the top of federal guidelines. He's served nearly half that time already.

U.S. District Judge Noel Hillman said he gave him a harsh penalty, but not because there was some chance the 49-year-old Pennsauken resident would have used his position somehow to commit another sex offense.

The issue, the judge said during a sentencing hearing that turned out to have more legal complications that expected, was that Kuni, using a false name, went to work for the Census Bureau. The agency is one of the few arms of the federal government that compels personal information from every American.

Kuni's action, Hillman said, violated "what I would characterize as a social compact between the government and the governed."

Kuni had a long criminal history. Prosecutors said he'd been convicted of at least 16 different crimes over the last three decades, including cocaine trafficking and burglary. He was convicted in 1996 of sexually assaulting one girl and having inappropriate contact with another.

And he shifted his identity often. Hillman said he used at least 19 different aliases over the years.

Despite that, he managed to get a job going door-to-door for the Census in 2000.

It didn't work so well when he did it again in May 2010.

He got the job under the name Jamie Shepard. A few days into it, a woman in his community, at home with her toddler, recognized him as Kuni, partly because of his long and amusing list of aliases, which included the names "Phanton Flam" and "Toot Flynn."

Census officials say they were on his trail about the same time because they realized his fingerprints suggested he was not Jamie Shepard.

He pleaded guilty in November to charges of making false statements, fraudulent use of a Social Security number and fraudulent use of an identification document.

His sentencing hearing dragged on for nearly three hours as lawyers debated issues such as whether he should be subject to greater punishment for tampering with his old Burlington County College identification. There was a momentary delay when the power in the courthouse went out just as Hillman was to give the sentence.

Kuni's public defender, Lori Koch, argued that there was a simple reason Kuni lied on his employment application: "It's difficult for a man with a sex offense conviction to find a job," she said.

He has complied with all the requirements of sex offenders since he was convicted, she said, and was not trying to misuse the job. When authorities went through the hard drives of the several computers they found in his home, she said, they didn't find child porn or records of trying to contact young people.

The worst they found, she said, was thousands of illegally downloaded sitcoms and movies from the 1970s, 80s and 90s.

That, Koch explained, was evidence of his obsessive-compulsive disorder.

Assistant U.S. Attorney Jason Richardson said something else more ominous was found in his home: A list of girls' names and addressed gathered when he worked on the 2000 census. There was no evidence he contacted any of them.

When Kuni was allowed to speak, he did so for less than a minute — and used part of the time to rebut his own lawyer's comment that he does not live the right way.

"I disagree with her saying I live wrong," he said. "I think everybody else lives wrong that they spend so much money. ... I can live on $6,000 a year."

He didn't show a reaction when he was sentenced.

He could be back in court again.

Lawyers mentioned that the government is considering more charges against him because of the illegally downloaded entertainment.