edited peak detection method