mods to compile and run on macos