reworking template structure