updated scripts to fix csv reading bugs