upated auto script