addition of algebraic terms