initial template merge