Hundreds of prison inmates in Idaho found a way to add hundreds of thousands of dollars worth of credit to their personal accounts, officials discovered this month.

The prisoners were not inflating their bank accounts, but rather their JPay accounts. JPay is a service that inmates can use to communicate with the outside world; for example, by using secure tablets or kiosks to send emails or listen to music.

The Idaho Department of Correction learned about the hacking on July 2, and an investigation revealed that 364 inmates at five correctional facilities “had improperly credited their JPay accounts by $224,772.40,” Jeff Ray, the department’s spokesman, said in a statement.

“This conduct was intentional, not accidental,” he said. “It required a knowledge of the JPay system and multiple actions by every inmate who exploited the system’s vulnerability to improperly credit their account.”