Flanagan dropped out during his freshman year of Kensington Culinary Arts High, then spent a decade working jobs that allowed him to scrape out a living - roofing, clerking at a convenience store under the El, cooking at a Pizza Hut near his home in Fishtown.

He also began selling marijuana, and in February, got caught. Flanagan, 24, spent a night in jail on a felony drug charge.

Then, he was offered a lifeline: instead of prison, enroll in The Choice is Yours, a diversion program for first-time, nonviolent felony drug offenders operated by nonprofit JEVS Human Services with the Philadelphia District Attorney's Office, Municipal Court, and the Defender Association of Philadelphia. The program, founded in 2012, provides workforce training, community service, and other supports.

If participants stay out of trouble for a year, all charges are dropped and their records expunged.

Deputy District Attorney Mike Barry works with Flanagan and others in the program. He's a big fan.

"Anything that can help us ensure that these guys can get a job and lead a normal, stable life just keeps us all safer," Barry said. "But also - we want to be thoughtful and innovative and progressive, making the city better. For awhile there, the only solution to somebody being arrested for selling drugs was jail."

Flanagan buckled down big-time, zooming through his coursework in a few months, earning a 3.8 GPA and valedictorian status, all while working 50 hours a week at a car wash and caring for his baby daughter.

Recently, he became one of the first five graduates of the high school diploma program. Flanagan even delivered a speech he wrote out on thick cream-colored paper, folded three times, and carried around with him for days.

"I always expected things to be handed to me on a silver platter; I had an entitlement attitude," he said. Now, things are different.

"I have to put my family first," Flanagan said.

The diploma has shifted his world view, Flanagan said: He knows he'll stress school to daughter Brielle, 11 months, and he'd like to continue his own education at a trade school, eventually owning his own roofing company.

The message resonated with his classmate Melvin Weaver, 27, who got kicked out of Frankford High in ninth grade.

Eventually, he found work as a bartender. He had children.

"Then I met the wrong people - and it got into my head that I should be hustling," Weaver said. He was arrested in December. His thoughts immediately shifted to his four children and their future.

As a first-time offender, he too qualified for TCY, and took it seriously. His cheering section may have been the largest at the program's September graduation.

"I'm getting my life together," Weaver said.

TCY is small, with 87 men and women enrolled, and it has an annual budget of $487,000, funded with foundation support and some state money. But it pays dividends, officials say: It costs roughly $42,000 annually to incarcerate a Philadelphian, but just over $5,000 to put them through the program, which lasts 13 months.

The new high school diploma cohort has a 90 percent completion rate. Overall, the program has a completion rate of about 80 percent.

Nigel Bowe, program director, calls it a "get-out-of-jail free" card, and said participants take it seriously.

"They know when they go to court, they're going to be held accountable, so they're held accountable here," Bowe said. "To throw away this opportunity doesn't make any sense."

Barry, the deputy district attorney, said he's proud of the newly minted high school graduates.

"For guys like this, who are young, who have educational needs, job-training needs, who have their whole life in front of them, we shouldn't assume they're on the bad path," Barry said. "Maybe what they did on one particular day won't define them for the rest of their lives."

Baltimore, MarylandMeet with Penn Foster at the Advance CTE Fall Meeting to learn more about our online education and skills training solutions and our work with hundreds of workforce training organizations and colleges across the country.

Chicago, IllinoisStop by Booth #303 at Staffing World, the largest convention and expo in the staffing, recruiting, and workforce solutions industry, to learn more about Penn Foster’s online education and skills training solutions.