Added experimental debug code