simplify the way to compute operand type