private Map<Integer, Double> getTagRecencies(List<UserData> bookmarks) {
		//Collections.sort(bookmarks); // TODO: necessary?
		int testIndex = bookmarks.size() + 1;
		Map<Integer, Integer> firstUsages = new LinkedHashMap<Integer, Integer>();
		Map<Integer, Integer> lastUsages = new LinkedHashMap<Integer, Integer>();
		Map<Integer, Double> resultMap = new LinkedHashMap<Integer, Double>();
		for (int i = 0; i < bookmarks.size(); i++) {
			for (int tag : bookmarks.get(i).getTags()) {
				Integer firstIndex = firstUsages.get(tag);
				Integer lastIndex = lastUsages.get(tag);
				if (firstIndex == null || i < firstIndex) {
					firstUsages.put(tag, i);
				};
				if (lastIndex == null || i > lastIndex) {
					lastUsages.put(tag, i);
				};
			}
		}
		
		for (Map.Entry<Integer, Integer> firstIndex : firstUsages.entrySet()) {
			double firstVal = Math.log((double)(testIndex - firstIndex.getValue()));
			double lastVal = Math.log((double)(testIndex - lastUsages.get(firstIndex.getKey())));
			Double rec = firstVal * (Math.pow(lastVal, firstVal * (-1.0)));
			if (!rec.isNaN() && !rec.isInfinite()) {
				resultMap.put(firstIndex.getKey(), rec.doubleValue());
			}
		}
		return resultMap;
	}