switch thing with the messages, single-threaded