transitive closure for paths works