changes by dev119 for template setting