implement OSX hook