working with duplicates control.