improve osx scripts