public Thread acquirePackets(final List<Packet> buffer, final int count) { //Method to hold the received packets in an arrayList of packets

		//ArrayList of packets called List
		
		final PacketReceiver receiver = new PacketReceiver() { //Declaration of a new packetReciever called receiver
			
			@Override
			public void receivePacket(Packet packet) { //Method to process the packet
				
				synchronized (buffer) {
					buffer.add(packet); //Adds the packet to the ArrayList					
				}
				if(count > -1) {
					System.out.println("received packet.."); //Prints a line to confirm packet was received 
				}
				if (done || packetsRecieved == count)
					captor.breakLoop();
			
				packetsRecieved++;
			}
		}; //End of InnerClass
		
		//captor.loopPacket(count, receiver);
		Runnable runnable = new Runnable(){

			@Override
			public void run() {
				try {
					Thread.sleep(4000);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				captor.loopPacket(count, receiver); //Loop for packets until closed
			}
			
		};
		Thread snifferThread = new Thread(runnable);
		snifferThread.setName("Sniffer");
		snifferThread.start();
		return snifferThread;
	}