public void SCC() {
        HashMap<Node, Boolean> visited = new HashMap<Node, Boolean>();
        ret = new HashMap<Node, Integer>();


        for (Node v : vertices)
            visited.put(v, false);

        topologicalSeq();
        while (!TS.empty()) {
            int currentId = TS.pop();
            Node curretNode = map.get(currentId);

            if (!visited.get(curretNode)) {
                dfs(curretNode, visited);
            }

            count++;
        }


        // statistics of scc
        HashMap<Integer, Integer> statistics = new HashMap<Integer, Integer>();
        for (Integer v : ret.values()) {
            if (!statistics.containsKey(v))
                statistics.put(v, 0);

            int temp = statistics.get(v);
            statistics.put(v, temp + 1);
        }

        for (Integer m : statistics.keySet()) {
            System.out.println(m + ": " + statistics.get(m));
        }
    }