created ThreadPool class