add an improved automation script
replace the automation script by a python version