added conditional to detect if on a mac.