added packet_number arg