relocating ReducePeaks()

with surprisingly good result