Renamed quality to threshold.