moving pcap related code into its own class