private static void downloadSounds() {

		// flag for download time out
		boolean flagTimeout = false;

		// flag to move to the next sound
		// NOTE: set to false for the first sound
		boolean doNextSound = false;

		// creates the keyword directory
		createDirectory(keyword);

		System.out
				.println("\nDOWNLOADING:\t\t" + sounds.size() + " sound(s)\n");

		System.out.println("\t\t\t#\tID\tFilename");
		System.out.println("\t\t\t------------------------");

		// loops over all sounds in list
		for (int i = 0; i < sounds.size(); i++) {

			Sound s = sounds.get(i);
			doNextSound = false;

			// CURRENT SOUND
			while (!doNextSound) {

				doNextSound = true;

				System.out.print("\t\t\t" + (numDownloaded + 1) + "\t"
						+ s.getId() + "\t" + s.getName());

				// the output stream to save sound file
				FileOutputStream out;

				// the file to save
				File f = new File(keyword + "/" + s.getId() + "."
						+ s.getFileType());

				HttpResponse res;
				CloseableHttpClient httpclient = HttpClients.createDefault();
				String authorizationString = "Bearer " + accessToken;

				try {
					HttpGet request = new HttpGet(URI.create(s.getUrl()));

					request.addHeader("Authorization", authorizationString);
					res = httpclient.execute(request);

					out = new FileOutputStream(f);

					int read = 0;
					byte[] bytes = new byte[16 * 1024];
					long totalBytesInStream = 0;
					while ((read = res.getEntity().getContent().read(bytes)) != -1) {

						// checks if timed out
						String str = new String(bytes);
						if (str.contains("Request was throttled")) {
							flagTimeout = true;
							break;
						}

						out.write(bytes, 0, read);

						System.out.print(".");
						totalBytesInStream = totalBytesInStream + bytes.length;
					}

					if (flagTimeout) {
						// reset flagTimeout
						flagTimeout = false;

						// don't do next sound
						doNextSound = false;

						System.out.println(" [Timing out for 60 seconds]");
						System.out.print("\nTIMEOUT:\t\t");

						// timeout
						Timer.timeout(60 * 1000);
						System.out.println();

						// continue current sound loop
						continue;
					}

					// prints the total filesize
					System.out.print(" success [");
					System.out.println(FileUtils
							.byteCountToDisplaySize(totalBytesInStream) + "]");

					// closes the file streams
					res.getEntity().getContent().close();
					out.close();

					// saves Sound object to JSON index file
					saveSoundToJsonIndexFile(s);

					//
					doNextSound = true;

				} catch (IOException e) {
					e.printStackTrace();
				}

				numDownloaded++;
			}
		}
	}