refactoring persistance