initializing template structure