add mac compatibility