add avearge and reference