making BFS like HFS