added some debugging tools