group duplicate names by item