update for v2 of pthreads
add DOM example