1. rename functions
2. add showmsg_fun function