public void sort(){  
      if (a.size() <= 1) return;
      int x = a.size() / 2;
      int y = a.size() - x;
      ArrayList<String> first = new ArrayList<String>();
      ArrayList<String> second = new ArrayList<String>();
      // Copy the first half of a into first, the second half into second
      for (int i = 0; i < x; i++) { first.add(i, a.get(i)); }
      for (int i = 0; i < y; i++) 
         second.add(i, a.get(x+i)); 
      MergeSorter2 firstSorter = new MergeSorter2(first);
      MergeSorter2 secondSorter = new MergeSorter2(second);
      firstSorter.sort();
      secondSorter.sort();
      merge(first, second);
   }