Use ArrayList instead of TreeSet for ordering