solved findPeakElement