Updated to support Mac OS