a bit better, forget the 0s
a bit more debugging
I think it is working now
cleaned up the code