adding doc for ffi functions