Add update term and input nodes in tree