update move for bfs dfs id