adding transitive closure graph