sync with mainwindow