refine sendmessage