public static Hashtable getLargestConnectedSubgraph(GraphEltSet ges) {
        int nodeCount = ges.nodeCount();
        if(nodeCount==0) return null;

        Vector subgraphVector = new Vector();
        for(int i=0; i<nodeCount; i++) {
            Node n = ges.nodeAt(i);
            boolean skipNode=false;
            for (int j = 0; j<subgraphVector.size();j++) {
                if(((Hashtable) subgraphVector.elementAt(j)).contains(n)) {
                    skipNode=true;
                }
            }
//					Collection subgraph = calculateDistances(ges,n,1000).keySet();
						Hashtable subgraph = calculateDistances(ges,n,1000);
            if(subgraph.size()>nodeCount/2) return subgraph; //We are done
            if (!skipNode) subgraphVector.addElement(subgraph);

        }

        int maxSize=0;
        int maxIndex=0;
        for (int j = 0; j<subgraphVector.size();j++) {
            if(((Hashtable) subgraphVector.elementAt(j)).size()>maxSize) {
                maxSize = ((Hashtable) subgraphVector.elementAt(j)).size();
                maxIndex = j;
            }
        }

        return (Hashtable) subgraphVector.elementAt(maxIndex);
    }