added openmp for the MC Loop