refactor partials