Updated openmp code