moving template into layout so its easier to see