make it work on osx and linux