Added max frequency per document