     Pdu.new({command_id, command_status, 0})
   end
 
-  @spec submit_sm(Pdu.addr, Pdu.addr, String.t, non_neg_integer) :: Pdu.t
-
-  def submit_sm({source_addr, source_addr_ton, source_addr_npi}, {dest_addr, dest_addr_ton, dest_addr_npi}, message, registered_delivery \\ 0) do
+  @type message :: String.t | { data_coding :: non_neg_integer, String.t }
+  @spec submit_sm(Pdu.addr, Pdu.addr, String.t, message) :: Pdu.t
+
+  def submit_sm(source, dest, message, registered_delivery \\ 0)
+
+  def submit_sm({source_addr, source_addr_ton, source_addr_npi}, {dest_addr, dest_addr_ton, dest_addr_npi}, {data_coding, message}, registered_delivery) do
     {:ok, command_id} = CommandNames.id_by_name(:submit_sm)
     Pdu.new(
       command_id,

    )
  end

  @spec deliver_sm(Pdu.addr, Pdu.addr, String.t) :: Pdu.t

  def deliver_sm({source_addr, source_addr_ton, source_addr_npi}, {dest_addr, dest_addr_ton, dest_addr_npi}, message) do
    {:ok, command_id} = CommandNames.id_by_name(:deliver_sm)
    Pdu.new(
      command_id,

        destination_addr: dest_addr,
        dest_addr_ton: dest_addr_ton,
        dest_addr_npi: dest_addr_npi,
        short_message: message,
        data_coding: data_coding
      }
    )
  end

  def deliver_sm({source_addr, source_addr_ton, source_addr_npi}, {dest_addr, dest_addr_ton, dest_addr_npi}, message) when is_binary(message) do
    deliver_sm({source_addr, source_addr_ton, source_addr_npi}, {dest_addr, dest_addr_ton, dest_addr_npi}, {0, message})
  end

  @type message_state :: non_neg_integer | atom
