generating partials only when needed