JAKARTA (AFP) - Life isn't easy for convicted militants like Machmudi Hariono when they walk out of prison in Indonesia.
Barred from most jobs, shunned by society, Hariono's debts piled up until an outreach programme working with reformed jihadists got him a kitchen job in a small cafe.
Today the 40-year-old manages several businesses, including a car rental service, and is "at peace" having found a new calling far from the radicalisation that derailed his life.
"It will erase the old you, the one who stayed in prison, no trace of it," Hariono told AFP from Solo, a city in central Java that is a hotbed for radical extremism.
"You will find a new life that is colourful."
Programmes aimed at deradicalising hardliners have taken many forms in Indonesia, from gardening classes run behind bars to family reunions organised by not-for-profit groups.
But in the aftermath of this month's deadly Jakarta attack, hard questions are being asked about the government's efforts to identify and tackle radicalism in prison, after police revealed one of the gunmen was a previously jailed militant lured to the Islamic State in Iraq and Syria (ISIS) group while behind bars.
Afif, who goes by one name, was jailed for seven years for training at a militant camp but was released early in mid 2015 for good behaviour.
Six months later he was dead, along with three other militants and four civilians, after perpetrating the first gun and suicide bomb attack claimed by ISIS in South-east Asia.
"Afif managed to mask his radicalism inside prison," Noor Huda Ismail, who has worked closely with reformed extremists and is an expert on Indonesian militancy, told AFP.
"Most prisoners considered him quiet and not a troublemaker."
In prison Afif was in contact with Aman Abdurrahman, a radical preacher incarcerated on multiple terror offences, Ismail said.
Abdurrahman pledged allegiance to ISIS while behind bars, and translated messages from the brutal militant group in his sermons to fellow convicts.
Though support for ISIS in Indonesian prisons remains low, a handful of inmates have left for Syria upon release and mass pledges of allegiance - unbeknownst to authorities - have occurred behind bars, South-east Asia terror expert Sidney Jones said in a talk last year.
If Afif was evolving into a violent radical while incarcerated, it went undetected by prison authorities.
He was cooperative and didn't break rules, explained justice ministry spokesman Akbar Hadi Prabowo.
He was also classified as a "follower" - the least-risk category assigned to convicted militants.
"But one's ideology can change. If a doctor declares you healthy, it doesn't mean you won't fall ill again," Prabowo told AFP.
He would not comment on whether Afif took part in prison-run deradicalisation programmes.
Indonesia has no formal programme for monitoring militants once they're released from prison, something President Joko Widodo has pledged to address since the Jakarta attack.
Police deradicalisation efforts are focused on prisons, and tactics have changed over the years.
Where cooperative inmates were once offered better food or extensive family visits, today classes on nationalism, religion and even gardening are being employed to soften hardliners.
"From planting the seed, the convict must take care of the plant as it grows. If they love their plant, they can love humans more too," Prabowo said of this novel approach.
But government efforts are often rushed, formalised and lack the personal touch, said Alijah Diete, a case worker who has spent years helping recently released extremists through a not-for-profit group.
Once outside prison, it's these non-government organisations that step in, and experience suggests their engagement at this vulnerable stage is working, albeit on a small scale.
Of the 35 militants Diete has assisted, only five have returned to their extremist comrades.
Diete has helped militants find jobs, provided small loans to kick-start businesses and worked successfully with their families - particularly their wives - to persuade them against reconnecting with familiar old networks.
But trust cannot be earned in a handful of classes, she said. Some militants have accused her of conspiring with the government while others "think we are infidels".
"One thing I've learned is that it is extremely difficult to separate these people from their groups," she told AFP.
"We have to show them a new way of thinking, befriend them, but it all takes time."