Added new parameters: weak and strong thresholds.