Added maxThreads