added mac specific stuff