Use TreeSet for keeping the order