better solution than previous hack (nw)
oops, debug code (nw)