BFS works as intented. Educational commit.