extract the clone function