rename functions
some optimizations
some optimizations
use clone to initialize threadpool