added openmp in for loops