update  main window