add threadpool
add depth judge