make thread count configureable