sort occurrences of a key, no duplicate occurrences