Added changes for autocorrelation