fixed osx script to my liking