Draft of AutoCorrelation that compiles (not tested)