remove debugging statements and use hauke's code by default