first attempt at adding support for Mac