autocorrelation function added