change resource to template