some explanation about how to use the flags in SortedSet