added read_operand function