updated mac script