Add thread to msg

The details are in the commits!