$packetNum as a parameter