Schools' role in tackling bad childhood experiences
As a teenager he was sleeping in a park and trying to wash his clothes in a river so he would be clean for school.
Matthew Cox was one of too many children who did not get adequate help soon enough, Future Generations Commissioner Sophie Howe has said.
She wants the education system and agencies working closer on adverse childhood experiences (ACE).
Mr Cox, now 22, works in a call centre and dreams of starting his own landscape gardening company.
It is an amazing turnaround for a man who said bullying throughout his childhood affected his behaviour and ended with him sleeping rough while still in school.
"While living on the streets in Pontypridd park I was trying to get a bit of cash myself, trying to find a job," he said.
"With me having dirty clothes, going back and fore to work and school, I tried to go to the launderettes and tried to get my clothes washed or even washing them in the river just to try and look clean."
It was a teacher who realised what was happening and found him a place in a bed and breakfast until homelessness charity Llamau stepped in.
According to Public Health Wales (PHW) almost half of adults in Wales have suffered at least one ACE - anything from parental separation to abuse.
And 14% of adults is have suffered four or more ACEs, increasing risks to their health.
The study showed the more ACEs people experience, the greater their risk of a wide range of health-harming behaviours and diseases as an adult.
A child could have witnessed a domestic abuse incident taking place in their home last night, mum or dad being beaten up
In January, the Welsh Government announced £400,000 to set up a hub to tackle the negative impact of ACEs and £50,000 to support more research by PHW.
Ms Howe wants more early intervention and said much good practice in schools could be key in tackling the issue if there was a more joined-up approach.
"A child could have witnessed a domestic abuse incident taking place in their home last night, mum or dad being beaten up, the police being called, a hugely traumatic time and yet the school teacher when they go into school this morning would not necessarily be aware that that's what happened last night.
"We know that there is much more we could do in having this integrated approach between all of our public services, which is after all what the Well Being of Future Generations Act requires."
Glan Usk Primary School in Newport has designed its whole approach to learning around well-being.
Inclusion leader Annette James said tackling difficult issues in children's lives had to come first if they were to achieve.
"We target self-esteem, building self confidence so that they have those positive experiences, so that those children who might be reluctant to come to school who might not have those positive experiences in the class have the opportunity to achieve and reach their full potential."
Rhian Tilley, a family and pupil support worker, believes this generation has it tougher than their parents and identifying ACEs is vital for a child's life chances.
"They may not have had breakfast, there may have been an argument at home, they may have very difficult home lives or family circumstances and then they are coming into school and are expected to learn and do the best they can, but while they are sat there they are thinking 'I'm hungry'."
Head teacher Jeff Beecher said schools were ready to share information but this was not always forthcoming from other agencies.
"At the end of the day it's about funding, unfortunately, and resources.
"In Newport we have had what is called 'team around the cluster' where we've tried to marry all those agencies together in discussing pupils needs.
"But at times it's sporadic, sometimes there hasn't been enough funding to support that strategy and for those people to get together so its been difficult, but it is the way forward and I think we need a full commitment financially to support these needs."