move initialization of thread pool