enhancements made to sending messages example code.