saving before refactoring