more porting, more tests