fixes #473 ... GRRRR that is why I prefere for loops :/
remove excessive debugging output and PEP8