convert many messages to use the send_messages() subroutine