add OSX compatibility