added exception handling for not enough operands