added second thread param