optimize new_script.sh