private void quickSortTractList(int low, int high)
    {
        int i = low, j = high;
        CensusTract temp;
        BigDecimal pivot = tractList.get(low + (high - low) / 2).getPosition().getDistance(reference);

        // loop through the array to determine next value to left (i) and right (j) of pivot that doesn't belong
        // (ordering from least to greatest)
        while (i <= j)
        {
            while (tractList.get(i).getPosition().getDistance(reference).compareTo(pivot) < 0)
                i++;
            while (tractList.get(j).getPosition().getDistance(reference).compareTo(pivot) > 0)
                j--;

            // if value on the left is bigger than pivot and value on left is smaller than pivot, swap
            if (i <= j)
            {
                temp = tractList.get(i);
                tractList.set(i, tractList.get(j));
                tractList.set(j, temp);
                i++;
                j--;
            }
        }

        // recursively repeat until sorted
        if (low < j)
            quickSortTractList(low, j);
        if (i < high)
            quickSortTractList(i, high);
    }