added failurCriterion.m