better debugging system - final