add threading for pyqtgraph