OSX support

passes tests