add fortran functoins