did first few steps of BFS, up to set s.d = 0