Added thresholdLenght functionality for negative diff peaks