serial and openmp codes