added parallel capability with openmp