term function

Deal with terms