changed to compile on mac os