updated threadRepository