program now fully compliant with fortran code