enclose optional rules with optional