minor improvement on OpenMP parallelization
cleanup and polishing