private static List<ClientReceiver> getPeers(int file_id, 
		OutputStream out, InputStream in, String path) throws IOException, RuntimeException{
		// (req to download c->s) [header | file id]
		// (download response s->c) [header | IP | Port]xNum clients
		
		timer.cancel(); // comm issues
		
		// construct/send request
		System.out.println("Contacting Server...");
		buf = Utility.addHeader(Constants.DOWNLOAD_REQ, 4, id);
		buf.putInt(Constants.HEADER_LEN, file_id);
		out.write(buf.array());
		out.flush();
		
		// make sure to keep acking (this download may take some time)
    	timer = new Timer();
    	Acker ack = new Acker(out, tcpSocket, id);
    	timer.scheduleAtFixedRate(ack, 0, Constants.ACK_TIMEOUT / 2);
		
		// open connection with each peer
		List<ClientReceiver> peers = new ArrayList<ClientReceiver>();
		
		while (true) {
			//(download response s->c) [header | Port | peer id]xNum clients

			if ((buf = Utility.readIn(in, Constants.HEADER_LEN)) == null)
				throw new IOException("read failed.");
			if (buf.getInt(0) != Constants.DOWNLOAD_REQ || buf.getInt(8) != id)
				throw new RuntimeException("Malformed header!");
			int payload_len = buf.getInt(4);
			
			// read in payload
			if ((buf = Utility.readIn(in, Utility.getPaddedLength(payload_len))) == null)
					throw new IOException();
			int port_num = buf.getInt(0);
			int peer_id = buf.getInt(4);
			if (port_num == 0 && peer_id == 0)
				// no more peers
				break;
			
			// process peer
			InetAddress addr = tcpSocket.getInetAddress();
			Socket peer;
			System.out.println("Connecting to " + addr + " on port " + port_num +"!");
			try {
				peer = new Socket(addr, port_num);
			} catch (IOException e){
				System.out.println("Connection failed.");
				// what to do if a peer fails?
				continue;
			}
			ClientReceiver c = new ClientReceiver(id, path, file_id, peer_id, peer);
			peers.add(c);
			System.out.println("Connected to " + addr + " on port " + port_num +"!");
		}
		
		if (peers.size() == 0)
			System.out.println("No available peers for this file.");
		
		return peers;
	}