SAT working with pthreads- need to cudify it