main template done