Refactor with partials