lots of template adjustments