added threadpool for the thread :/