update visited