bfs now operates in background