add debug print
typo
add debugPrint()
correct boolean test