adds some minor debug code