for porting