Added method for calculating the ACF.