     function hexstrToBytes(string _hexstr) public pure returns (bytes) {
         uint len = bytes(_hexstr).length;
         require(len % 2 == 0);
         bytes memory bstr = bytes(new string(len / 2));
         uint k = 0;
         string memory s;
         string memory r;
         for (uint i = 0; i < len; i += 2) {
             s = substring(_hexstr, i, i + 1);
             r = substring(_hexstr, i + 1, i + 2);
             uint p = parseInt16Char(s) * 16 + parseInt16Char(r);
             bstr[k++] = uintToBytes32(p)[31];
         }
         return bstr;
     }