Updated for OSX