finding local extrema, example 1.mp4