change dg_nml_loop to dg_loop