Update dup function