fortran code made more readable