In accordance with his pleas, the appellant was convicted by a military judge sitting as a general court-martial of rape, unlawful entry, and adultery in violation of Articles 120 and 134, Uniform Code of Military Justice, 10 U.S.C. §§ 920, and 934. The approved sentence includes a dishonorable discharge, confinement for seven years, total forfeiture of pay but not allowances, and reduction to the lowest enlisted pay grade, E-1.
We have carefully reviewed the record of trial, the appellant’s three assignments of error, and the Government’s response.1 We conclude that the findings and sentence are correct in law and fact and that no error materially prejudicial to the substantial rights of the appellant exists. See Arts. 59(a) and 66(c), UCMJ, 10 U.S.C. §§ 859(a) and 866(c).
Improper Aggravation
In his first assignment of error, the appellant argues that the military judge erred by admitting improper testimony, over defense objection, that related to a charge that was withdrawn prior to findings. We disagree.
Among other offenses, the appellant was originally charged with both raping and forcibly sodomizing the victim, Lance Corporal [T], on the same occasion in September 1997. Following extended plea negotiations, the appellant pleaded guilty to raping Lance Corporal [T], but not guilty to forcibly sodomizing her. After the military judge announced findings of guilty of the charges to which the appellant pleaded guilty, the sodomy charge and its specification were among those withdrawn and dismissed. Record at 96.
During the sentencing hearing, the trial counsel called the rape victim as a witness in aggravation and the following colloquy ensued:
Q: After the rape you were brought to the hospital early the next morning, correct?
A: Yes, I was, sir.
Q: Describe the examination for us.
A: Describe?
Q: Did you later learn that you had rectal injuries?
Id. at 125-26.
At this point the defense counsel objected to the questioning on the basis that the testimony related to the sodomy allegation, which the Government did not pursue at trial on the merits. Id. at 126. The trial counsel responded that the victim’s testimony related to “the facts and circumstances that surrounds [sic] the rape____ The victim suffered physical injuries as a result of the rape, and I’m simply exploring those physical injuries.” Id. at 126-27. The military judge overruled the objection and the testimony continued:
Q: Did you later learn that you had rectal tears as a result of the rape?
A: Well, actually during the examination, it started to hurt when [the nurse] was doing something. Then she told me that I had a rectal tear, and I asked her what that was. She told me what it was.
Id. at 127.
During sentencing proceedings, “[t]he trial counsel may present evidence as to any aggravating circumstances directly relating to or resulting from, the offenses of which the accused has been found guilty.” Rule for Courts-Martial 1001(b)(4), Manual for Courts Martial, United States (1998 ed.)(emphasis added); United States v. Vickers, 13 M.J. 403, 406 (C.M.A.1982). Uncharged misconduct is often admissible as evidence in aggravation; it may accompany *739the offense of which the accused has been found guilty, e.g., sodomy incident to a rape. United States v. Wingart, 27 M.J. 128, 135 (C.M.A.1988). Under the facts of this case, we conclude that the victim’s testimony that she sustained a rectal tear during the course of the rape is admissible under R.C.M. 1001(b)(4). This assignment of error is without merit.
Improper Argument
The appellant next contends that trial counsel’s sentencing argument was improper and constituted plain error. We again disagree.
During the providence inquiry, the accused described the victim as conscious; aware, but silent, and “too intoxicated to consent.” Record at 77. As the accused described the events constituting the rape, he and the victim were facing each other. Id.
The government’s first witness in aggravation was Sergeant Anderson, the barracks duty noncommissioned officer-in-eharge [DNCO] on the night of the rape. He testified that after he had ordered the victim’s roommates to put her to bed, he later found it prudent to cheek on her condition. His testimony reflected that he found the victim face down in her bed, unconscious or asleep, with her pants off, panties around her ankles, legs spread, and what appeared to be semen on her buttocks. Id. at 104-06.
The portion of the tidal counsel’s sentencing argument to which the appellant appears to object is as follows:
[W]hat happened that night was rape, as the accused pled, but it was much more aggravating (sic) than he says today. He entered the room unlawfully, pulled the pants down of a passed out, unconscious ... Lance Corporal [T], He raped her from behind ... inserted his penis into her vagina from behind, all the while, the victim, an unconscious Marine, beneath him. What further supports this is the rectal tears ... found at the SART exam____ So the missionary position, sexual intercourse with a too-drunk girl that the accused — which is rape, and which I find very aggravating — -pales in comparison to what really happened. He was minimizing during his providency (sic).
Id. at 152.
There was no objection to this argument. The appellant chooses to characterize this on appeal as a veiled reference to the sodomy charge. Nowhere in the appellant’s brief does he refer us to the specific language that he finds objectionable in the trial counsel’s argument, which covered two-and-a-half pages, more or less, in the record. The appellant’s brief, however, refers to the “trial counsel’s attempt to argue, in essence, that Appellant had also sodomized [Lance Corporal T].” Appellant’s Brief of 13 Sep 1999 at 6.
We decline to adopt the appellant’s characterization, in his brief, of the trial counsel’s sentencing argument. Rather, we understand the argument to be that, contrary to the appellant’s description of the rape during the providence inquiry, in reality the rape involved an unconscious victim whom the appellant entered from behind, while being unconcerned about her consent or for her well-being.
A trial counsel has an obligation to represent the Government zealously and argue for an appropriate sentence, as long as the argument is fair and reasonably based on the evidence. United States v. Hampton, 40 M.J. 457, 459 (C.M.A.1994); United States v. Kropf, 39 M.J. 107, 108 (C.M.A.1994); United States v. Edwards, 35 M.J. 351, 356 (C.M.A. 1992). In this case, the trial counsel’s argu ment was fair comment on the evidence of record. The single reference in the argument to a rectal tear, the evidence of which we have previously found to be properly admitted as aggravation pursuant to R.C.M. 1001(b)(4), does not, without more, render this argument improper. The trial counsel was not inviting the military judge to sentence the appellant for committing sodomy. We conclude there was no error in the argument.
Even assuming arguendo that the trial counsel’s argument was improper, unless a timely objection to an improper argument is made, the issue is forfeited in the absence of plain error. R.C.M. 1001(g); Ed*740wards, 35 M.J. at 355. To constitute plain error, the error must be obvious and materially prejudice a substantial right of the appellant. Art. 59(a), UCMJ; United States v. Powell, 49 M.J. 460, 462-64 (1998); United States v. Fisher, 21 M.J. 327, 328 (C.M.A. 1986).
For the following reasons, we find no plain error. First, the trial defense counsel did not object to the comment, thereby supporting an inference that either no error was perceived or any error committed was inconsequential. See United States v. Grandy, 11 M.J. 270, 275 (C.M.A.1981). Second, in light of the admissibility of the evidence of the rectal tear, the comment was clearly proper. Third, the trial defense counsel specifically countered the trial counsel’s comment with the following remarks in his sentencing argument:
Sir, you have heard the evidence. You don’t need the trial counsel to tell you what was said____
Sergeant Anderson, the one that observed Lance Corporal [T] ... wasn’t closer than eight feet from [the] bed. There was just a lamp on. It was dark in there, and he was able to describe for you what he saw. Well, sir, what he saw was incorrect____ Lance Corporal Osborne, [the victim’s] roommate ... who had the opportunity, sir, to go up to [the victim], try to wake her up and cover her up____
What did [she] tell you? The pants were off. The underwear was off. They were at the edge of the bed, and they were in[side] each other, as if [the victim] had taken them off.
Sir, that contradicts, left and right, what this sergeant tried to tell you____
Record at 153. Finally, the military judge is presumed to know the law and apply it correctly. United States v. Raya, 45 M.J. 251, 253 (1996). We are confident that the military judge would not sentence the appellant for the offense of sodomy, of which the appellant was not convicted. Consequently, we do not find plain error. Art. 59(a), UCMJ; Powell, 49 M.J. at 464-65. This assignment of error is without merit.
Illegal Pretrial Punishment
In his final assignment of error, the appellant contends that he suffered illegal pretrial punishment, in violation of Article 13, UCMJ, 10 U.S.C. § 813, because he was placed in a cell by himself under maximum custody limitations. The appellant avers that this was based solely upon the length of the potential sentence for the charges pending against him.2 Appellant’s Brief of 13 Sep 1999 at 7. The appellant requests three-for-one credit against the approved sentence to confinement for each day spent in pretrial confinement.3 We resolve this issue against the appellant and decline to grant relief.
According to an affidavit of the appellant accompanying his pleading, upon being committed to pretrial confinement on 29 September 1997, he was placed in maximum custody where he remained until he was tried on 10 April 1998. Affidavit of the Appellant dated 27 May 1999. He was allowed out of his cell one hour per day Monday through Friday. Id. Saturday and Sunday, he was allowed outside of his cell for only ten minutes to shower. Id. He was handcuffed any time he was outside of his cell, and was also in leg irons any time he was outside the special quarters section of the confinement facility. Id. He was never allowed outside his cell without an escort. Id. The appellant avers that when he asked his brig counselor why he was in maximum custody, he was told it was because of the length of confinement he was facing based on the pending charges. Id. As a result, the appellant asserts that this was done solely “because he was facing serious charges with the potential for long-term confinement.” Appellant’s Brief of 13 Sep 1999 at 7.
No motion for appropriate relief based on unlawful pretrial punishment or illegal pretrial confinement was raised at trial. See *741Record at 52; R.C.M. 305(f)(pretriai punishment prohibited) or ©(military judge may order credit for pretrial confinement that involves unusually harsh circumstances). The appellant voluntarily pleaded guilty. Record at 55, 95. Further, as a matter related to his pretrial agreement, the appellant voluntarily entered a stipulation of fact in which he agreed that the “pretrial confinement served by [him] has been legal.” Record at 87; Prosecution Exhibit 1 at 3; Appellate Exhibit VIII at 2. The military judge informed the appellant that the stipulation, if accepted by the court, was binding on the parties. The appellant does not contest the voluntariness of either his pleas or his decision to join the stipulation of fact. Finally, the appellant made the military judge aware of the conditions of pretrial confinement during the sentencing phase of the court-martial. Record at 148. The military judge was able, therefore, if he wished, “to take into account the nature of [the] appellant’s pretrial confinement in determining the amount of confinement appropriate as a punishment for his offenses.” United States v. McFadyen, 51 M.J. 289, 291 (1999); see also United States v. Southwick, 53 M.J. 412 (2000)(holding trial tactics amounted to an affirmative waiver of pretrial punishment issue where it was clear from the record that appellant made a tactical decision to take the pretrial-punishment issue to the members instead of asking the military judge for appropriate relief).
We conclude that the appellant’s tactical decision to negotiate away the issues connected with the conditions of pretrial confinement in return for the guaranteed sentencing protection of a pretrial agreement was tantamount to an affirmative waiver of the issue of illegal pretrial punishment. McFadyen;4 see also United States v. Huffman, 40 M.J. 225, 227 (C.M.A.1994)(noting court will not invoke waiver of issue concerning conditions of pretrial confinement without affirmative waiver on the record as to do otherwise simply raises questions of ineffective assistance or other collateral matters).
Even if not waived, however, based on the pleadings and attached documents, we conclude that the conditions of the appellant’s pretrial confinement were not imposed as punishment but rather were related to legitimate government objectives. Bell v. Wolfish, 441 U.S. 520, 538-39, 99 S.Ct. 1861, 60 L.Ed.2d 447 (1979); United States v. Palmiter, 20 M.J. 90, 95 (C.M.A.1985).
An affidavit by Chief Warrant Officer Dooley, the Programs Officer at the Camp Pendleton Base Brig, reflects that because of the nature of the charges, the appellant was perceived by brig personnel to be an aggressive person with no respect for the rights of others. Affidavit of Chief Warrant Officer Dooley dated 19 Nov 1999. That perception caused brig personnel to be concerned about the safety of other detainees and required additional supervision of the appellant. Id. The appellant was considered by the brig personnel to be a serious escape risk who might injure brig personnel in order to effect an escape. Id. The appellant, himself, “related a history of assaultive behavior stating he had been in ‘many fights.’ ” Id. The appellant’s commanding officer characterized the appellant as having a “blatant disrespect for the rules and regulations ... evidenced by his repeated violations of the UCMJ.” Id. The Initial Review Officer expressed the view that “if given the opportunity, [the appellant] would likely engage in intimidation of witnesses and victims, as well as posing a threat to the safety of the command.” Id.
These facts are substantially different from the facts in this court’s opinion in United States v. Anderson, 49 M.J. 575 (N.M.Ct. Crim.App.1998). This court concluded that Corporal Anderson, who was charged with numerous non-violent drug offenses including importation and distribution of marijuana, was placed in special quarters in pretrial confinement based solely on the length of *742potential post-trial confinement for the crimes with which he was charged. The special quarters conditions were identical to the appellant’s, but occurred pursuant to an apparent unwritten policy that any pretrial confinee who faced potential confinement in excess of five years would be placed in special quarters without regard to any other factors. In Anderson, the Government made no effort to rebut Corporal Anderson’s contention that the length of potential post-trial confinement was the only factor brig personnel considered in placing him in special quarters.
The appellant’s circumstances are not similar. Brig personnel had sufficient information to justify the imposition of conditions of confinement that would enable them to lawfully segregate the appellant from the general population for the protection of brig personnel and other detainees. Moreover, we perceive no intent to punish the appellant prior to trial. We find that under these circumstances the conditions of the appellant’s pretrial confinement were related to legitimate government objectives.5 We find no abuse of discretion on the part of brig personnel in assigning the appellant a maximum custody classification during pretrial confinement. See United States v. McCarthy, 47 M.J. 162, 164-68 (1997); United States v. Mance, 47 M.J. 742, 748 (N.M.Ct. Crim.App.1997). Consequently, even if the appellant had not waived the issue, we would find no illegal pretrial punishment. The assignment of error is without merit.
Accordingly, the findings and the sentence as approved on review below are affirmed.
Senior Judge LEO and Judge ANDERSON concur.
. Both the appellant and the Government, concurrent with filing their briefs, filed Motions to Attach Documents, which are hereby granted.
. This assignment of error is raised pursuant to United States v. Grostefon, 12 M.J. 431 (C.M.A. 1982).
. See United States v. Suzuki, 14 M.J. 491 (C.M.A. 1983).
. McFadyen established a requirement that, for cases tried after 14 November 1999, waivers of Article 13, UCMJ, issues in pretrial agreements be accompanied by judicial inquiry into the circumstances of pretrial confinement, the voluntariness of the accused’s waiver, and accused’s understanding of the remedy to which he would be entitled if he prevailed on the issue. However, that requirement does not apply to the appellant’s case as it was tried more than a year prior to our superior court’s decision in McFadyen.
. We have noted that the appellant was released into the general brig population following his court-martial, but do not find this to be inconsistent. He had been sober for a substantial period, his incentive to flee, possibly injuring someone in the attempt, had been significantly reduced by the imposition of a sentence including only seven years confinement (reduced to five years by virtue of the pretrial agreement), as opposed to confinement for life; and the perceived benefits to him of possible witness intimidation were necessarily diminished following the court-martial. Therefore, the circumstances that justified the earlier conditions of confinement changed significantly post-trial.