transitive closure testing