fixed ineffeciency when calculating only the auto correlation