removed debug code, added a lot of printouts
added one more printline