message packing extracted, smaller modifications