add multi-thread part
add multi-thread part