added Mac OS X support