Changes for new bfs generator