Updated criteriaFunction and criteriaThreshold to put function and threshold in compound tags functions and thresholds.