wip persistence refactoring