added main window interface code