some more py porting