modify_script on the process function