add MaxNonTerm and MaxHieroNonTerm