adapted osx file to my needs