Oops, function would not work on osx