add a function called showmsg