add minor update to gen_avg.