Created PeakDetector class