filter partials to reduce code redundancy