Added an executeMessage function.