modify publishmessage