Adding logic for the mac