change find candidate text node function