Added autocorelation function