improvements to debugging