group mergeGlobal inside sendMessage function