added amplitude threshold to peak finding