reverted fortran code to original

fixing formatting mistakes that gave many errors when compiling