added support for mac osx