renaming  variables and restoring history of a code