Update clone function