added functionality to peakfinder