working on ffi a bit more