use partials to reduce code reiteration