Update dupulicate function.