changed thread structure