Logic for mac