optimize for OSX