added logic to filter out rows for tags that have already been printed.