revise for many threads