updated lib for Mac OS