added pthreads back in