added os x support, all tests pass