made exitCriterion variable public