make number of worker threads configurable