tweak threads.jl