updated template and mainwindow