prob with num_threads > omp_get_max_threads
merge