adding templates and changing the layout