more c porting