The BFS starts from goal. Can I rewrite it to the normal order?