updated scripts with batch control