finish twogap_ddw.f90