Add rule matching