main template added
sql updated