improved tests of transitive closure