merged osx branch with master