added exception and thread_pool