removed unused th[threads] array