add docs and comparator function to TreeMap