parallelized for loop