One prison in America came up with an incredible way to change the lives of both prisoners and shelter dogs for the better.

Canine Cell Mates, a foundation that runs a program in collaboration with the Fulton County Jail in Atlanta, partners shelter dogs who were awaiting adoption to the prisoners, according to a report by CNN.

Inmates and the dogs keep each other company 24/7 in the span of two months, where dogs are cared for and trained by their human companions.

According to the report, this kind of program helps the abandoned animals get used to a new set of people on a new environment, which will then make it easier for them to adapt better once they find their fur-ever home.

Meanwhile, the dogs’ presence gives inmates a calming feeling, becoming responsible in taking care of the animal, gaining accountability and confidence in attaining a goal and experiencing the joy of love from a man’s best friend, which reported will certainly allow inmates to become “law abiding, productive members of society.”

“Most of these guys gave up believing that there was very much of value to them a long time ago. But when that dog loves them and trusts them that starts to change how they feel about themselves,” Susan Jacobs-Meadows, executive director of Canine Cell Mates, told CNN.

Canine Cell Mates reported that a 50% decrease in prison violence also showed how positive this new program is.

“The bond that [Fred and I] have – he came to a place where he was going to be put to death and I came from a place that was on the bad side. If Fred can have an opportunity to go to a good home and he can change, that makes me want to change the environment that I’m in. That means I can do better also,” one inmate told CNN.