Return visitedGraph, not remove vertex