added inheritance to all templates