splitting templates to parts