private void finalMerge0(int[] a, int low, int high) {
        int mid = (low + high) / 2;
        int i = low, j = mid;
        int k = 0;

        while (i < mid && j < high) {
            if (a[i] < a[j]) {
                temp[k++] = a[i];
                i++;
            } else {
                temp[k++] = a[j];
                j++;
            }
        }

        while (i < mid) { //copy remaining i's
            temp[k++] = a[i];
            i++;
        }

        while (j < high) {
            temp[k++] = a[j];
            j++;
        }

        //copy it all back over
        for (k = 0; k < high - low; k++) {
            set(low + k, temp[k]);
        }
    }