updated thread.c for turnin