add procedure on MainWindow