initial template insertion