Add sorted before add_rule