modified to test on osx