more threading changes