implement a TreeSet