work on ffi and linux porting stuff