added condition for mac