instrumenting: adding thread tracking