updated automatic script.