more refactoring, updating the osx version