the GUI needs to be running in its own thread