added OpenMP parallelization