Finished BFS part