*713OPINION OF THE COURT
STONE, Senior Judge.A panel of officer members, sitting as a general court-martial, convicted the appellant, contrary to his pleas, of two specifications of using ecstasy and two specifications of distributing ecstasy, in violation of Article 112a, UCMJ, 10 U.S.C. § 912a. Consistent with his pleas, he was found guilty of using marijuana, also a violation of Article 112a, UCMJ. The adjudged and approved sentence included a bad-conduct discharge, confinement for 150 days, forfeiture of all pay and allowances, and reduction to the grade of E-l.
The appellant contends the military judge improperly excluded portions of the character statements he offered in sentencing. Additionally, he claims the evidence is factually and legally insufficient to support the specifications involving use and distribution of ecstasy on 13 August 2000 while he was on temporary duty in the Ascension Islands. Finally, the appellant asserts the military judge gave improper sentencing instructions. We resolve these issues against the appellant and affirm.
I. Exclusion of Portions of the Appellant’s Character Statements
While the court members were deliberating on findings, the military judge held a session outside their presence pursuant to Article 39a, UCMJ, 10 U.S.C. § 839a. During this session, the appellant offered six character letters from noncommissioned officers (NCOs). All of the letters followed the same general format. The introductory paragraph indicated the NCOs had direct knowledge of the appellant’s duty performance and the nature of the charges he faced. This was followed by a second paragraph describing the appellant’s duty performance variously as “outstanding,” “impeccable,” and “reliable” and highlighting a number of favorable character traits such as his positive attitude, respect for authority, and efficiency. The final paragraph in each of these letters addressed the appellant’s rehabilitative potential.
Trial counsel objected to portions of the final paragraph in each of the six character letters. The military judge sustained trial counsel’s objections in part. In three of the letters, the redacted language was virtually identical: “I have no doubt Sr A Griggs will continue to be an asset to the mission of the squadron and the Air Force. I ask the panel to [give Sr A Griggs] a second chance to be a productive member of the United States Air Force.” Although the trial counsel indicated he would have no objection to the last sentence if the words “United States Air Force” were replaced with “society,” the appellant apparently elected not to make that substitution in the redacted version of the letters presented to the members. As to the remaining three letters, the military judge sustained the trial counsel’s objection as to the following comments:
In fact, I have two airmen I’d gladly trade just to keep him. I feel the Air Force could use more airmen like him.
I continue to hear, “This is not a one mistake Air Force.... ”
[I] am convinced that he ... can still be of great potential to the United States Air Force---- We seem to ... toss [young airmen] out after investing so much time, effort and money.
Trial counsel argued that these comments were recommendations for retention and would confuse the members. In sustaining the objection, the military judge expressed concerns that the comments would confuse the court members. Additionally, the military judge cited Rule for Courts-Martial (R.C.M.) 1001(b)(5)(D) as a basis for his decision. This provision precludes “opinion [testimony] regarding the appropriateness of a punitive discharge or whether the accused should be returned to the accused’s unit.” Although the trial defense counsel conceded this provision was applicable, the appellant now argues it was error for the military judge to evaluate the admissibility of defense sentencing evidence under R.C.M. 1001(b)(5)(D), a provision he now contends applies only to the government.
A military judge’s ruling on the admission or exclusion of sentencing evidence is reviewed for a clear abuse of discretion. United States v. Zakaria, 38 M.J. 280, 283 *714(C.M.A.1993). When a military judge’s ruling is based on an erroneous view of the law, it is generally considered an abuse of discretion. United States v. Becker, 46 M.J. 141 (C.A.A.F.1997). The findings or sentence of a court-martial may not be held incorrect on the ground of an error of law, however, unless the error materially prejudices the substantial rights of the accused. Article 59(a), UCMJ, 10 U.S.C. § 859(a).
The appellant is indeed correct that the restrictive language from R.C.M. 1001(b)(5)(D) falls under the general heading, “Matter to be presented by the prosecution.” (Emphasis added.) Adopted in 1994, this provision essentially codifies case law developed by our superior court. See Drafters’ Analysis, Manual for Courts-Martial, United States (MCM), A21-70 (2000 ed.). See also United States v. Pompey, 33 M.J. 266 (C.M.A.1991); United States v. Claxton, 32 M.J. 159 (C.M.A.1991); United States v. Aurich, 31 M.J. 95 (C.M.A.1990); United States v. Ohrt, 28 M.J. 301 (C.M.A.1989); United States v. Horner, 22 M.J. 294 (C.M.A.1986).
A strictly textual interpretation of this provision, however, ignores the long and nuaneed history of the rules governing opinion testimony about an accused’s rehabilitative potential.* The principal case in this area of military sentencing law is United States v. Ohrt, an Air Force case appealed to our superior court after this Court, sitting en banc, was evenly divided on the issue of whether an accused’s commander could testify in sentencing on the question of rehabilitative potential. See generally United States v. Ohrt, 26 M.J. 578 (A.F.C.M.R.1988). Appellate courts have struggled with this issue in an effort to balance several important interests. These include:
(1) Improper command influence. Military case law reflects significant concern that prosecutors would “bring a commanding officer before a court-martial preemptively to influence the court members” through opinion testimony. Ohrt, 28 M.J. at 303 (emphasis in the original). The presumed weight that a commander’s testimony might carry has been viewed as an unfair opportunity for a commander to influence the sentencing authority’s decision on a punitive discharge.
(2) Confusion. Another common concern is that such testimony would confuse court members about the critical distinction between a punitive discharge (punishment) and retention in the military (the appropriateness of continued military service). Id. at 305.
(3) Usurping the role of the sentencing authority. A belief that opinion testimony would usurp the sentencing authority’s role has been a prominent concern in this area of sentencing jurisprudence. Appellate courts have made it clear such testimony should not express a “personal opinion concerning what punishment would be appropriate for the offense.” United States v. Wilson, 31 M.J. 91, 93 (C.M.A.1990). Testimony that indirectly suggests a particular punishment is considered a “euphemism” and has similarly been held improper. Ohrt, 28 M.J. at 305.
(4) Proper foundation for opinion. Rehabilitation witnesses must have a rational basis for their opinion and cannot offer an opinion if it is based primarily on the severity of the offense itself. Wilson, 31 M.J. at 94; Horner, 22 M.J. at 296.
(5) Uncharged misconduct. Government witnesses must avoid any references to uncharged misconduct, unless the defense opens the door on cross-examination. Ohrt, 28 M.J. at 303-05.
Do these same interests apply to rehabilitation evidence offered by an accused? Of the considerations listed above, risk of confusion, usurpation of the sentencing authority’s role, and foundational requirements logically apply to the defense as well as to the prosecution.
Through the years, however, the issue of whether it is improper for an accused to present opinion testimony recommending retention in the service has received inconsistent treatment in military appellate decisions — none of which have been specifically called upon to resolve the question. Many decisions suggest that such testimony is proper. See Aurich, 31 M.J. at 96 (favorable *715testimony from a commander that he or she does want an accused back in the unit “has long been relevant in courts-martial”) (per curiam) (dictum); Pompey, 33 M.J. at 267 (court implicitly endorsed defense witness being able to testify, “I would not hesitate to have [the accused] work for me again and feel he is certainly capable of rehabilitation”); United States v. Bish, 54 M.J. 860, 863 (A.F.Ct.Crim.App.2001) (because rule “falls under R.C.M. 1001(b) — matter to be presented by the prosecution — it does not appear to prohibit the defense from offering evidence that a member of the accused’s unit wants him [or her] back”) (dictum), pet. denied, 55 M.J. 371 (C.A.A.F.2001).
On the other hand, Judge Cox, writing for the majority in Ohrt, observed:
[A] witness — be he for the prosecution or the defense — should not be allowed to express an opinion whether an accused should be punitively discharged. The question of appropriateness of punishment is one which must be decided by the court-martial; it cannot be usurped by a witness ----The use of euphemisms ... are just other ways of saying, “Give the accused a punitive discharge.”
Ohrt, 28 M.J. at 304-05.
Subsequent to the 1994 amendment to R.C.M. 1001(b)(5)(D), our superior court decided United States v. Ramos, 42 M.J. 392 (C.A.A.F.1995). In that case, the accused’s first-line supervisor testified, among other things, that the accused could continue to serve and contribute to the United States Army. The military judge sua sponte instructed the court members that this testimony should be disregarded by the court members “because of the danger that [they] would perceive a punitive discharge as being an elimination type” of proceeding. Id. at 395. The accused in that case argued that the military judge abandoned his impartiality in giving this instruction. Our superior court opined:
[I]t does not seem entirely unreasonable that the military judge viewed such testimony as out of bounds. [The defense sentencing witness] had voiced an opinion that Ramos “could rehabilitate himself and continue to serve and contribute to the United States Army.” In United States v. Ohrt ... this Court recognized that “use of euphemisms, such as ‘No potential for continued service’; ‘He should be separated’; or the like are just other ways of saying, ‘Give the accused a punitive discharge.’ ” The mirror image might reasonably be that an opinion that an accused could “continue to serve and contribute to the United States Army” simply is a euphemism for, “I do not believe you should give him a punitive discharge.” If so, then such testimony would seem to be what the Ohrt Court had in mind when it explicitly stated that “a witness — be he for the prosecution or the defense — should not be allowed to express an opinion whether an accused should be punitively discharged.”
Id. at 396 (emphasis in the original).
Finally, we turn to R.C.M. 1001(c)(1)(B), which provides guidance on mitigation evidence offered by the defense. It states:
Matter in mitigation of an offense is introduced to lessen the punishment to be adjudged by the court-martial, or to furnish grounds for a recommendation of clemency. It includes ... evidence of the reputation or record of the accused in the service for efficiency, fidelity, subordination, temperance, courage, or any other trait that is desirable in a servicemember.
This provision gives an accused broad, but not unbridled, latitude. Notably, it does not address the relevance of testimony concerning a witness’ desire to have an accused remain in the military.
Given this confusion, we conclude the military judge did not abuse his discretion, especially when the defense counsel agreed that R.C.M. 1001(b)(5)(D) applied to defense sentencing evidence. Even if we were to conclude it was error, reversal is not necessarily warranted absent material prejudice to the appellant’s substantial rights. Article 59(a), UCMJ. See United States v. Williams, 50 M.J. 397, 400 (C.A.A.F.1999); United States v. Cherry, 31 M.J. 1 (C.M.A.1990).
We hold there was no prejudice. Despite the redactions from the six character statements, we are confident the appellant had a full and fair opportunity to present *716mitigation evidence. The few sentences that were redacted would not have made a significant difference in the presentation of the case for either side. The government’s evidence indicated the appellant had a spotty record involving relatively minor disciplinary infractions throughout his career. The six character statements, however, did much to provide a more positive picture of the appellant’s military service. They were well written and highly complimentary. They presented strong evidence that the appellant was highly regarded by his immediate supervisors as a diligent, hardworking airman. Thus, even if it was error to exclude this evidence, we hold such error was harmless.
II. Legal and Factual Sufficiency
The appellant avers that the evidence is legally and factually insufficient as to specifications 1 and 2 of the Charge. As previously stated, these allegations involve the use and distribution of ecstasy on 13 August 2000 while the appellant was on temporary duty in the Ascension Islands. The appellant contends the evidence does not establish that the pill he split and shared with another airman was ecstasy. At trial, the appellant’s defense counsel argued that the pill was herbal ecstasy, a legal substance found in specialty stores.
We may affirm only those findings of guilty we find are correct in law and fact and determine, on the basis of the entire record, should be approved. Article 66(c), UCMJ, 10 U.S.C. § 866(c). The test for legal sufficiency is whether, considering the evidence in the light most favorable to the prosecution, any rational factfinder could have found all of the essential elements beyond a reasonable doubt. Jackson v. Virginia, 443 U.S. 307, 319, 99 S.Ct. 2781, 61 L.Ed.2d 560 (1979); United States v. Turner, 25 M.J. 324 (C.M.A.1987). The test for factual sufficiency is whether, after weighing the evidence and making allowances for not having observed the witnesses, we are convinced of the appellant’s guilt beyond a reasonable doubt. United States v. Reed, 54 M.J. 37, 41 (C.A.A.F.2000).
Having carefully reviewed the record of trial, we find the evidence relating to the contraband nature of the substance the appellant used and distributed was credible and convincing. We find that there is sufficient evidence to convince a rational trier of fact that the accused is guilty beyond a reasonable doubt of wrongfully using and distributing ecstasy, a Schedule I controlled substance, at the time and place in question. Furthermore, weighing all of the evidence admitted at trial and being mindful of the fact that we have not seen or heard the witnesses, we are ourselves convinced beyond a reasonable doubt that the appellant wrongfully used and distributed ecstasy in violation of Article 112a, UCMJ. Thus, we hold that the evidence is legally and factually sufficient.
III. Sentencing Instructions
In a hearing outside the presence of the court members to discuss sentencing instructions, the defense counsel asked the military judge to highlight specific extenuation and mitigation evidence, commonly referred to in Air Force practice as Wheeler factors. United States v. Wheeler, 38 C.M.R. 72, 1967 WL 4375 (C.M.A.1967). These factors included: (1) the fact the appellant was 24 years old at the time of the offenses; (2) the appellant’s “personal background” and “family difficulties;” (3) his status as a parent of a two-year-old son; (4) his high school education; (5) the length of time he had been “under charges;” (6) his guilty plea; (7) his efficient duty performance as reflected in his performance reports; (8) his remorse; (9) his participation in a substance abuse awareness seminar; (10) his awards; (11) his desire to remain in the service; and (12) his desire to avoid a bad-conduct discharge.
The military judge declined to instruct on each factor, citing United States v. Hopkins, 55 M.J. 546 (A.F.Ct.Crim.App.2001), aff'd, 56 M.J. 393 (C.A.A.F.2002). In Hopkins, this Court held that a judge is not required to list “each and every possible mitigating factor for the court members to consider.” Id. at 550. In United States v. Blough, 57 M.J. 528 (A.F.Ct.Crim.App.2002), this Court elaborated on Hopkins by holding that a military judge must provide “general guidelines” to court members:
*717The “tailoring” envisioned by Wheeler is in selecting the general categories of mitigating or extenuating evidence which are appropriate for instruction, such as evidence of good character, a good service record, pretrial restraint, or mental impairment. However, it is not necessary to detail each piece of evidence that may demonstrate such matters, although a military judge certainly has the discretion to do so.
Id. at 533.
The sentencing instructions in the case sub judiee were consistent with these decisions. The military judge instructed the members as follows:
In determining the sentence, you should consider all the facts and circumstances of the offenses of which the accused has been convicted, and all matters concerning the accused whether presented before or after findings. Thus, you should consider the accused’s background, his character, his service record, all matters in extenuation and mitigation, and any other evidence he presented.
The military judge also gave the standard instruction that guilty pleas are a matter in mitigation. He had previously instructed the court members that the appellant’s unsworn statement must be given appropriate consideration. Moreover, he advised the defense counsel he was free to highlight the specific evidence during argument.
It is important to note that despite defense counsel’s request for instructions on the Wheeler factors, when the military judge asked the defense counsel if he had any objection to the instructions, he offered none. Thus, any error was waived in the absence of plain error. R.C.M. 1005(f). Even if there was no waiver in this case, the military judge did not abuse his discretion. “The military judge has considerable discretion in tailoring instructions to the evidence and law” depending on the facts and circumstances of each case. Hopkins, 56 M.J. at 395. We therefore hold that the military judge did not err.
IV. Conclusion
The approved findings and sentence are correct in law and fact and no error prejudicial to the substantial rights of the appellant occurred. Article 66(c), UCMJ; Reed, 54 M.J. at 41. Accordingly, the approved findings and sentence are
AFFIRMED.
See generally Major Lauren K. Hemperley, USAF, Looking Beyond the Verdict: An Examination of Prosecution Sentencing Evidence, 39 A.F. L.Rev. 185, 197-205 (1996).