for mac os porting