Added parameter to stoppingCondition