sub templates working