make the same changes for osx
cross-platform