mod: update osx implementation, not yet complete