updated the layout of the main window