finished main template