finished the pthread file