send messages on a separate thread, as it takes a while