add thread.c