refactoring to partials