some openmp optimizations