finished porting to linux