updated scripts for analysis