pause here; move to hybrid c and Fortran to use nice c pointers