pthreads not tested, but compiling