added code to figure out what the pid and tids of the program are so that new caches can be created for new threads