more porting stuff