some more porting