algorithms taking a packet and a list array.