Edit in BFS