OPINION OF THE COURT
De GIULIO, Judge:Appellant was tried in the Federal Republic of Germany by a military judge sitting as a general court-martial. He was found guilty of distribution of marijuana, use of marijuana, and two specifications of breaking restriction in violation of Articles *711112a and 134, Uniform Code of Military Justice, 10 U.S.C. §§ 912a and 934 (1982) [hereinafter UCMJ].1 He was sentenced to a bad-conduct discharge, confinement for six months, and forfeiture of all pay and allowances. The convening authority approved the sentence.
Appellant alleges that he was not given administrative credit toward his sentence for time spent in a pup tent pending trial. We agree that some relief is required and will reassess the sentence.
Subsequent to the commission of the offenses which resulted in his court-martial, appellant was required to sleep on a cot in the hallway outside the unit dayroom. He was restricted to post and required to have an escort wherever he went. Later, the accused was required to sleep in a pup tent located on a small grassy area outside the barracks building. At appellant’s court-martial, his company commander testified that appellant’s restriction to the pup tent was less restrictive than when he was in the hallway on the cot because, while in the pup tent, he was not required to be escorted wherever he went. He testified, however, that he felt putting appellant in the pup tent outside the charge of quarters (CQ) was necessary given “his propensity toward flight.”
In United States v. Hoover, 24 M.J. 874 (A.C.M.R.1987) this court condemned the placing of a soldier in a pup tent surrounded by concertina wire on the basis that it was not only restriction tantamount to confinement but also a violation of Article 13, UCMJ, 10 U.S.C. § 813. We also called upon those in authority to take action to preclude improper forms of pretrial restraint, pointing out that restriction tantamount to confinement is not a form of pretrial restraint set forth in the Uniform Code of Military Justice or Manual for Courts-Martial, United States, 1984, Rule for Courts-Martial 304(a)(1) through (4) [hereinafter R.C.M.]. Id. at n. 4. We again call upon those in authority to take action to preclude improper forms of pretrial restraint. Restriction tantamount to confinement improperly avoids procedural safeguards designed to prevent abuses.2 See, e.g. R.C.M. 305.
In the case before us, the unit commander’s testimony that appellant’s propensity for flight caused him to place appellant in the pup tent under the eye of the CQ is at odds with his testimony that, while assigned to the pup tent, appellant was not required to be escorted. Examining this testimony, we find that the placing of appellant in the pup tent was for the purpose of punishing him rather than insuring his presence at trial. We have little doubt that forcing appellant to live in a pup tent held him out to public ridicule. See United States v. Cruz, 25 M.J. 326 (C.M.A.1987). We hold this restraint to be in violation of Article 13, UCMJ. See Hoover, 24 M.J. at 878.
Although credit can be given for restriction tantamount to confinement3 or prior punishment, such a remedy does little to discourage use of this illegal restraint.4 We elect to reassess the sentence. See Hoover, 24 M.J. at 878. See also United States v. Pierce, 28 M.J. 1040, 1043 (A.C.M.R.1989) (this court should not substitute a deux ex machina for our indepen*712dent responsibility to determine appropriate sentences).
Accordingly, the findings of guilty are affirmed. Reassessing the sentence in light of the error noted and United States v. Sales, 22 M.J. 305 (C.M.A.1986), only so much of the sentence is affirmed as provides for confinement for six months.
Judge HAESSIG and Judge ARROW concur.. Pursuant to a pretrial agreement, appellant pled guilty to all offenses except one of breaking restriction. He was also found guilty of that offense.
. A unit commander is not left without a remedy for the soldier who breaches restriction in lieu of arrest or breaches arrest. Such violations are offenses under the Code. In addition, such a breach may provide a basis for pretrial confinement. See R.C.M. 304 discussion.
. United States v. Mason, 19 M.J. 274 (C.M.A.1985) (summary disposition); United States v. Smith, 20 M.J. 528 (A.C.M.R.1985).
. Not every violation of Article 13, UCMJ, requires action by appellate courts; but if there is substantial prejudice resulting from the prior punishment, remedial action is warranted. See United States v. Villamil-Perez, 32 M.J. 341 (C.M.A.1991). Here, however, we are dealing with restraint on liberty. We recognize commanders’ frustration in their inability to successfully impose pretrial confinement. Care must be taken, however, to insure that pretrial restraint is imposed within the limits of the UCMJ and the Manual for Courts-Martial.