a few small updates, lots of debug code