if packet is a string rather than a buffer, manipulate