Added duplicates support