public static void merge (String[] data, int firstIndex, int numOfValues1, int numOfValues2)
   {
       //System.out.println("Merging " + numOfValues1 + " and " + numOfValues2);
       String[] temp = new String[numOfValues1+numOfValues2];
       int numCopied = 0; //data to temp
       int leftPointer = 0; //copied from first half
       int rightPointer = 0; //copied from 2nd half
       int i;

       while ((leftPointer < numOfValues1) && (rightPointer < numOfValues2))
       {
           if (data[firstIndex + leftPointer].compareTo(data[firstIndex+numOfValues1+rightPointer]) <= 0)
           {
               temp[numCopied] = data[firstIndex + (leftPointer)];
               leftPointer++;
               numCopied++;
           }
           else
           {
               temp[numCopied] = data[firstIndex + numOfValues1 + (rightPointer)];
               rightPointer++;
               numCopied++;
           }
       }
       while (leftPointer < numOfValues1)
       {
           temp[numCopied] = data[firstIndex + (leftPointer)];
           leftPointer++;
           numCopied++;
       }
       while (rightPointer < numOfValues2)
       {
           temp[numCopied] = data[firstIndex + numOfValues1 + (rightPointer)];
           rightPointer++;
           numCopied++;
       }
       for (i = 0; i < numOfValues1+numOfValues2; i++)
       {
           data[firstIndex + i] = temp[i];
       }
   }