autosize of main window