MURPHYSBORO, Ill. (AP) — Southern Illinois prison inmates are training dogs from a local animal shelter, and officials say it’s helping both the dogs and the offenders.

WSIL-TV reports St. Francis Community Animal Rescue in Murphysboro has teamed up with the Vienna Correctional Center.

St. Francis sent six dogs to the prison for a 12-week basic training program. Inmates are helping the dogs learn basic commands and how to walk on a leash.

Kay Creese of the St. Francis Community Animal Rescue says “everybody wins.” She says the inmates are learning skills, and the dogs become better behaved and more prepared to go to a home.

Eight more dogs will enter the program later this month. A graduation and dog adoption event will be held in May.