For decades, the Government has locked up teenage offenders, even when they are on remand. It now knows there is nothing worse for their rehabilitation. So this year it is buying up homes all over the country to house them outside prison gates.
In a quiet suburb of Rotorua, there is a powder-blue house which looks like any other property on the street.
The five-bedroom home is a warm, inviting place. The smell of fresh baking is coming from the kitchen. There is a big lawn and a basketball court, and trees on the front lawn are shedding autumn leaves.
Inside, there are hints that this is no ordinary home. Some of the bedrooms have security devices which set off an alarm if a tenant gets up at night for the bathroom and does not return within 10 minutes.
The walls are made of thick material which stops them from being damaged easily. And in a macabre design feature, the door handles are slanted at 45 degrees so tenants cannot hang themselves on them.
The flat, called Te Kōhanga , is the most unlikely prison in the country.
Known as a community remand home, it can house up to four youth offenders while they wait for their trial. The boys, aged 14 to 16, are supervised around the clock and have two "house parents" who live with them.
"It's not a place to hang out with the bros," said Cath Deacon, one of the house parents. "But at the same time it's not a wing of a prison. It's a healing place."
This unassuming home - one of four around the country - is the future of the youth justice system.
The Government now knows that locking young offenders in a police cell with sentenced offenders is detrimental to their rehabilitation and their chances of reoffending. Putting youths on remand into youth justice facilities, or detention centres, is not much better .
Whānau to Prime Minister: 'We've been through enough'
Advocate: No one will hire disabled workers on minimum wage
In July , the youth justice sector will expand by 40 per cent because 17-year-olds will be moved from the adult Corrections system to the youth system, managed by Oranga Tamariki.
So the children's ministry is buying or leasing properties around the country to house young offenders while they are on remand. The four existing homes are in Rotorua, Dunedin and Palmerston North. And there will soon be homes in Auckland, Hamilton, Gisborne, Taranaki and Invercargill.
At Te Kōhanga, the boys have structured days including school lessons and counselling. They shop and cook for themselves (with supervision) and watch television. Loud music and swearing are banned "unless they drop a brick on their foot". They can't be visited by friends and any talk of crimes or gangs is off-limits.
Residence manager Christine Betchetti said the remand homes avoid one of the worst aspects of incarceration - tearing teenagers away from their whānau or their role models.
"You want to keep them close to that one school coach who says 'I see something in you, you're amazing'. That's the unconditional love, in a general sense, that young people need to be able to thrive."
Children's Commissioner Andrew Becroft, a vocal critic of youth incarceration, wants far more remand prisoners to be housed in the community or bailed to their homes - when it is safe to do so.
"This side of heaven, there is always going to be a need for ... lock-up environments for some young offenders.
"But there are many young people in youth justice custodial centres for whom the key doesn't need to be turned on them. They could be held on remand quite satisfactorily in the community."
At the nearby Te Maioha o Parekarangi Youth Justice Residence, around 70 per cent of the teenage prisoners are on remand. Flats were installed inside the detention centre in 2010 to make it as close to life outside prison as possible.
The rural facility is almost idyllic if you can ignore the 5m-tall perimeter fences. It sits at the crest of a steep hill scattered with sheep. There is a farm on site and hens and a dog walk around the grounds. Kale, strawberries and mint are growing in gardens built by the prisoners.
One inmate is barefoot. Another, just fresh from the gym, is bare-chested. The bedrooms in the flat look like a typical teenager's room - posters of rappers Tupac and Notorious BIG, and basketballers Steph Curry and Michael Jordan.
A 17-year-old living in one of the flats said he was learning to fix fences at the on-site farm. The following day, he was heading on a trout-fishing expedition.
"It's been good," he said. "I've enjoyed the opportunities I get here, the privileges I get. I get my own TV. I get to do my own washing, my dishes. It's more freedom. It's like luxury."
The teenager was jailed for "heaps of stuff" including car theft.
"I don't want to go back to that life," he said. "I just want to get a job and settle."
• Average of 170 young people in youth justice facilities at any one time.
• 70 per cent are on remand.
• Youth justice population will rise by 40 per cent in July as 17-year-olds enter the system.
• Four remand homes have been set up, and many more on the way.