adding more debug functionality