added autocorrelation support, not working properly yet