reorder and add partial openmp statements