persistence refactoring