Add and modify scripts to get averaged data