working on the main window