token packaging
pack and unpack message