solve duplicates