only calculate groupTags once