finished new threadpool implementation