add BFS and CC