why the global function here while you use this->msg below?