private static void sortFunction(Vector data, int begin, int end) {	//the sorting algorithm used is Quick Sort, which sorts 
		int i=begin, j=end;														//according to a pivotal point among the data 
		String pivot= (String) data.elementAt(end), swap, swap2;		//the end of the data is considered as the pivotal point
		while (i <= j) {
			while (((String)data.elementAt(i)).compareToIgnoreCase(pivot)< 0) i++;	//adds the beginning counter if the beginning element is less than the pivot
			while (((String)data.elementAt(j)).compareToIgnoreCase(pivot)> 0) j--; 	//subtracts the ending coutner if the ending element is greater than the pivot
			if (i<=j) {	//if the first index is smaller than the ending index 
				if (i!=j) {
					int tempStorage=sortIndexOrganizer[j];
					swap=(String)data.elementAt(j);	//the two data swap with each other 
					swap2=(String)data.elementAt(i);
					data.set(i, swap);
					data.set(j,swap2);
					sortIndexOrganizer[j]=sortIndexOrganizer[i];	//the sorting indices are also swapped with each other 
					sortIndexOrganizer[i] = tempStorage;
				}
				i++; 
				j--; 
			}				
		}
		if (begin < j) {	//re-uses the function as necessary until the right order is sorted 
			sortFunction (data, begin, j);
		}
		if (i < end) {
			sortFunction (data, i , end);
		}
 	}//sortFunction()