set duplicate element to appropriate value