Added mode for inverted sorting