handle duplicates