insert debug code