refactor into partials