Evaluating expressions with multiple variables