subset of function correctly identifies items with same role