rewrites needed for osx