uniform work and bfs