Rename visited.
Add dfs.