using partials to clean up duplication