adding debug code