add changemessage function