added pcap looping for basic packet capturing