cleaned up inmzpd.f