added threads to last loop in compute