evaluate algebraic expressions