revised pthread_join