Added code to record details of threads with responses