added error thresholds