Add the logic for exclusion by tag.