private T getValue(int index) {
		if (index > N) {
			throw new IndexOutOfBoundsException(String.valueOf(index));
		}
		long f = 0;
		for (T i : freqTable.keySet()) {
			f += freqTable.get(i);
			if (f >= index) {
				return i;
			}
		}
		return null;
	}