work on TemplateMode

Piroznik commit