template separation