changes structure of template