replace a couple of std::sort calls with tbb::parallel_sort