use FFI.typedef to map types