main template tricks