changes to improve tag-based filtering