public final int partitionByName(int lb, int ub) {
		Person pivotElement = allPersons[lb]; // store the left most value as the pivot element
		int max = logicalSize;
		int left = lb, right = ub; // store left and right as the unchanging values of lb and ub respectively. This is used for the final move of this method
		Person temp; // create a temp for swapping thing around.

		while (left < right) {
			while ((allPersons[left].getName().compareToIgnoreCase(pivotElement.getName()) <= 0) && left + 1 < max) { // test the order of the persons on left side
				left++;
			}
			while ((allPersons[right].getName().compareToIgnoreCase(pivotElement.getName()) > 0) && right - 1 >= 0) { // test the order of the persons on right side
				right--;
			}
			if (left < right) // swap the left and right persons, remember that temp variable, this is where it shines.
			{
				temp = allPersons[left];
				allPersons[left] = allPersons[right];
				allPersons[right] = temp;
			}
		}
		for (left = lb; left <= right && left + 1 < max; left++) { //move the persons one place to the left for all persons after the pivot element
			allPersons[left] = allPersons[left + 1];
		}
		allPersons[right] = pivotElement; // move the pivot element to its place at right, where it is now in the correct order.
		return right; // return the new pivot (see quick sort)
	}