applied template to cookie