started writing validation for template