edit to find graph structure