using RR with ffi