added embedded pMsg variable