refactor templates to use a base template
refactor templates to use a base template