threshold filter with pthreads working + runscript