now requires pthreads