added BFS and its output file