averaging peaks