Commented the generateMessage function