add to_hex_string method for debugging