copied main.f90 from 2d