updated analysis file to compute correlation function