Implemented 1st parallel loop with pthreads