slide template reworked to reduce duplication