added BFS traversal