private String recalculateCentroid(ArrayList<String> DNAStrands) {
		StringBuilder newCentroid = new StringBuilder();
		for (int i = 0; i < this.DNAlength; i++) {

			// get the frequency of each kind of nucleobase at "i" position
			// for all strands in the current cluster
			int[] freqNucleobases = new int[this.numNucleobases];
			for (String DNAStrand : DNAStrands) {
				char nucleobase = DNAStrand.charAt(i);
				switch (nucleobase) {
					case 'A' :
						freqNucleobases[0]++;
						break;
					case 'C' :
						freqNucleobases[1]++;
						break;
					case 'G' :
						freqNucleobases[2]++;
						break;
					case 'T' :
						freqNucleobases[3]++;
						break;
				}
			}

			// get the most populous nucleobase
			int maxFreq = Integer.MIN_VALUE;
			int popIndex = -1;
			for (int j = 0; j < this.numNucleobases; j++) {
				if (freqNucleobases[j] > maxFreq) {
					maxFreq = freqNucleobases[j];
					popIndex = j;
				}
			}
			// attach the most populous nucleobase to the new centroid
			newCentroid.append(this.nucleobases[popIndex]);
		}
		return new String(newCentroid);
	}