using Cocoa instead of Carbon for OSX