save state initial code
clone function working