replaced threading.Thread through QThread