serialization in IPacket