copy template stuff as well