sorted flags