slightly sped up group_indicies. added find_duplicate_items