handle rules with guards