improved debug output, highly improved recursive transitive closure
algorithm