clone function changes