modification on GraphSimulator and in the MainWindow