Creation of template