started refactoring save system