add bfs solution