implement average and correlation function calculation for road