Added debug test code