CHICAGO (CBS) — They were dogs with days left until they were saved — by a jail sentence.

Barbed wire doesn’t usually inspire hope, but as Brad Edwards reports, this is a different tale.

Deep within the bowels of Unit 9 at the Cook County Jail, poop pickup is a privilege.

Inmate Billy Dixon says Thin Mint was “a mess” at first. But he gets her to sit.

The program is called Tails of Redemption, and doomed dogs get a second chance.

“She’s came a long way,” said Dixon. “Never expected to be here with a dog.”

Dixon says he has come a long way, too.

“Anybody gets a little love, they change,” he said.

Dash is paired with Darrel White two cells down.

“I had zero experience with dogs before this,” he said. “In four days it will be five months.”

He said he has come a long way with him.

“Definitely. Cause, like, as I was teaching him, I was learning, too,” White said. “Patience, self control.”

Tarry Williams is the first deputy chief of staff.

“You see the offenders,” he said. “At the end of the program, it’s like they’ve done a 180 degree turn, and they’re these compassionate individuals. And I don’t know if it’s just the love they received from the dog, maybe they never had prior to coming into the jail. I don’t know, but it’s awesome to see.”

Williams said Sheriff Tom Dart came to him a year and a half ago with the idea.

The program has a nearly 100% adoption rate.

And the program has produced a drug dog.

“We never thought we’d find a dog capable of doing what Cookie is doing right now,” said Sgt. Erik Roedel with the Cook County Sheriff’s Department.

Cookie was one of the program’s first Pit mutts.

“She’s not genetically made and born to be a service dog,” said Dep. William Scanlon, Cookie’s handler with the K9 unit

“As they training went, they noticed that the drive for her toy was so high that she could possibly work as a canine. Cookie’s second find was over $100,000 in drug money,” said Williams.

“She’s had a couple good busts,” said Roedel.

“Again, this is a dog that could’ve been euthanized,” said Williams.

She made it from death’s door to certified drug dog.

She demonstrated checking jail mail for Edwards. She shows it’s all clear, but when she leaves the room, some cocaine is snuck into a bin.

When Cookie reenters, she instantly indicates the drugs are there.

She plays almost every day because narcotics training is play. She finds it, she gets the toy, and she plays.

“We like to say she won the lottery,” said Scanlon.

And so do the taxpayer. Cookie’s crew is a who’s who of pedigree and price tag.

Hans, a 5-year-old raw German shepherd with a good lineage as a pup cost taxpayers $6,000.

Bloodhound Kelli, named after murdered 14-year-old Kelli O’Laughlin, searches for the missing and was purchased for $3,000.

And Cookie, once considered worthless with surely a Maury Povich Show worthy past, now has a certain future.

“We have one that hasn’t been adopted yet,” said Williams. “Dash is going to stay with us until we find the right owner.”

When Dash’s inmate got out in July, he hoped to adopt Dash, but it wasn’t meant to be. This isn’t a fairy tale.

It’s Dash’s tale.

At the jail Dash is with Dixon, whose previous dog Thin Mint was adopted.

“He’s become the mascot of Tails of Redemption,” said Williams. “What can you say about it other than unbelievable?”

But shortly after Edwards and CBS 2 photojournalist Scott Wilson began working on the story, the sheriff’s department reached out in an email.

Doug was looking for a bit of redemption himself and found it in Dash at a weekend adoption event.

“Touched my heart right away,” he said. “I fell in love with him. He was real peaceful and made me peaceful. We’re best friends now. We both saved each other.”

Dash adjusted perfectly to his new home.

Tails of Redemption is 0% taxpayer funded, down to the donated treats.