added some threads to the app, which makes the gui more responsive