update document and comment for new ffi api