addInput, removeInput functions added