changed pthread_cond_timedwait to pthread_cond_wait to see if the program can use less processor power