save changes before refactoring the data being used