ORLANDO, Fla. — An internal investigation shows that an inmate at a Florida jail was allowed to eat Chinese takeout and sit in a guard station after hours in exchange for helping guards with financial and legal matters.

The investigation by the Orange County Corrections Department found that Robert Potchen gave guards advice on their taxes, student loans and mortgages in exchange for special privileges like accessing the Internet.

Potchen had been serving a 15 year prison sentence for pulling a gun on his wife, but he was in the jail as he awaited a hearing on a probation violation.

The Orlando Sentinel reports that another inmate told investigators that Potchen had a romantic relationship with a female guard.

The five guards involved have resigned or retired from their posts.