add method to convert DnsMessage to byte array