public boolean input(Instance instance) throws Exception {

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

    Method m = (Class.forName(m_Class)).getMethod(m_Method, new Class[] {Double.TYPE});

    double []vals = new double[instance.numAttributes()];
    Double []params = new Double[1];
    Double newVal;
    for(int i = 0; i < instance.numAttributes(); i++) {
      if (instance.isMissing(i)) {
	vals[i] = Instance.missingValue();
      } else {
	if (m_Cols.isInRange(i) &&
	    instance.attribute(i).isNumeric()) {
	  params[0] = new Double(instance.value(i));
	  newVal = (Double) m.invoke(null, (Object[])params);
	  if (newVal.isNaN() || newVal.isInfinite()) {
	    vals[i] = Instance.missingValue();
	  } else {
	    vals[i] = newVal.doubleValue(); 
	  }
	} else {
	  vals[i] = instance.value(i);
	}
      }
    }
    Instance inst = null;
    if (instance instanceof SparseInstance) {
      inst = new SparseInstance(instance.weight(), vals);
    } else {
      inst = new Instance(instance.weight(), vals);
    }
    inst.setDataset(instance.dataset());
    push(inst);
    return true;
  }