changing method to get to MainWindow