Just a few months ago Dan had ended up in a US jail overnight after urinating on a police car while celebrating his birthday.
It could have spelled the end of his Commonwealth dreams but instead the brush with the law spurred him on to win.
Dan said: “There were cries of ‘freedom’ when I won my medal because that is how the other team members know me.
“It’s not a political statement, it’s because a few months ago I was in a jail cell and now I’m free.
“It was the wake-up call I needed. I want to be the best swimmer in the world and that was enough for me to get my act together.”