optimizing the debug tools