test pthreads code