bfs is working with computation