adding ability to get unique id for pthreads