add thread.cpp