added public functions to mainwindow