add index of packet, clear the print