deal with duplicates