put debugging code into if statements, improved "debugging pixel" statement