arithmetic operations are properly nested