add BFS algorithm to find the real key links int the graph