add StopCriteria class.