nit: I guess we don't need separate local variable for ```threadMessages``` now.