Added the use of thread pool