adjusting templates and layout