refactoring saving partials