update script to work with osx