isEndConditionMet