added threadpool functionality