took the sending thread out of the main loop