public boolean input(Instance instance) {
    if (getInputFormat() == null) {
      throw new IllegalStateException("No input instance format defined");
    }
    if (m_NewBatch) {
      resetQueue();
      m_NewBatch = false;
    }

    Attribute att = getInputFormat().attribute(m_AttIndex.getIndex());
    FastVector newVals = new FastVector(att.numValues() - 1);
    for (int i = 0; i < att.numValues(); i++) {
      boolean inMergeList = false;

      if(att.value(i).equalsIgnoreCase(m_Label)){
	//don't want to add this one.
	inMergeList = true;		
      }else{
	inMergeList = m_MergeRange.isInRange(i);
      }

      if(!inMergeList){
	//add it.
	newVals.addElement(att.value(i));
      }
    }
    newVals.addElement(m_Label);

    Attribute temp = new Attribute(att.name(), newVals);

    Instance newInstance = (Instance)instance.copy();    
    if (!newInstance.isMissing(m_AttIndex.getIndex())) {
      String currValue = newInstance.stringValue(m_AttIndex.getIndex());
      if(temp.indexOfValue(currValue) == -1)
	newInstance.setValue(m_AttIndex.getIndex(), temp.indexOfValue(m_Label));
      else
	newInstance.setValue(m_AttIndex.getIndex(), temp.indexOfValue(currValue));
    }

    push(newInstance);
    return true;
  }