change some internal representation from Text to ByteString