simplify mac script