Added some code for comparison use with Fortran code