added FFI and stuff