updating batch scripts for generality