rewrote the message system.