make thread count configurable