change SCC DFS implementation to use a stack