copying the template to index