Added debug code