added front/back template support