auto-correlation now working