public static void executeTasks(List<Task> tasks, final CountDownLatch latch, ExecutorService pool) {
		for(final Task t : tasks) {
			pool.submit(new Runnable() {
				@Override
				public void run() {
					try { 
						t.execute();
					} catch(Exception e) {
						e.printStackTrace();
					} finally {
						latch.countDown();
					}
				}
			});
		}
		try {
			latch.await();
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}