private static void findLinks(URL url, Integer counter) {
		/*
		 * now we construct the first html body
		 */
        HtmlBody htmlBody;

		/*
		 * now we actually create the html body
		 */
        try {
			/*
			 * we have to create a new http client for every request because
			 * the sockets are use once-only
			 */
            httpClient = new HttpClient(new Socket(inputUrl.getHostname(), inputUrl.getPortNumber()));
            htmlBody = new HtmlBody(httpClient.send(new HttpRequest("GET " + inputUrl.getPath() + "/" + url.getFullPath() + " HTTP/1.0")));

        } catch (MalformedHttpException ex) {
            Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
            return;
        } catch (IOException ex) {
            Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
            return;
        }

		/*
		 * if our counter is the max url depth then
		 * we are done
		 */
        if (counter.equals(maxUrlDepth)) {
            return;
        }

		/*
		 * while we still have more links we want to download them
		 */
        for (HtmlLink htmlLink : htmlBody) {
            URL currentUrl = htmlLink.getURL();

			/*
			 * we only download links if they are html and don't have a
			 * different hostname
			 */
            if (currentUrl.isHtml() && currentUrl.getHostname().equals("") && !urlHashSet.contains(currentUrl.toString())) {
                urlHashSet.add(currentUrl.toString());
                handleLink(currentUrl);
                findLinks(currentUrl, counter + 1);
            }
        }

    }