debug code inserted