Added debug() statements