add the thread init