
373 N.W.2d 608 (1985)
Robert Ralph EMMES, Petitioner, Appellant,
v.
STATE of Minnesota, Respondent.
No. CO-85-1135.
Court of Appeals of Minnesota.
August 27, 1985.
Robert R. Emmes, pro se.
Hubert H. Humphrey, III, State Atty. Gen., St. Paul, Robert W. Kelly, Washington County Atty. by Louise A. Dobbe, Asst. County Atty., Stillwater, for respondent.
Considered and decided by POPOVICH, C.J., and FOLEY and LESLIE, JJ., with oral argument waived.

SUMMARY OPINION
FOLEY, Judge.

FACTS
Appellant Robert Emmes was charged with assault in the second degree. On October 26, 1983 he entered chemical dependency treatment at St. Joseph's Hospital in St. Paul and on November 23, 1983 he entered a halfway house. Around December 7, 1983, he was returned to jail and subsequently pleaded guilty to the assault. His attorney requested that he be conditionally released to the halfway house pending sentencing whether credit was received or not. The trial court granted this request until sentencing on February 10, 1984 when he was sent to prison.
Appellant's subsequent petition for postconviction relief for credit for time spent in the halfway house was denied by the postconviction court, resulting in this appeal.

DECISION
A defendant is entitled to credit for time spent in custody between arrest and sentencing. Minnesota Sentencing Guidelines III.C. The purpose behind this rule is that
"[T]he defendant is presumed innocent. There is evidence that the poor and members of racial minorities are more likely to be subject to pre-trial detention than others. Granting such jail credit for those receiving executed sentences makes the total periods of incarceration more equitable. *609 Minnesota Sentencing Guidelines and Comment III.C.01.
Here appellant voluntarily chose to attend treatment although he could not afford to post bail. As the post-conviction court noted,
The conditional release eliminated the disparity between the defendant who could post bail and enter the program, and a defendant who desired to complete the program but could not post bail. The only difference is that if Petitioner did not stay in the program he would have to be confined to jail. At that point, Petitioner would receive credit for all time spent in jail prior to sentencing. Such jail credit would satisfy the purposes of Minn.Stat. 609.145, subd. 2, and Minnesota Rules of Criminal Procedure 27.03, subd. 4(B).
We agree with the reasoning of the postconviction court. See also State v. Peterson, 359 N.W.2d 708 (Minn.Ct.App.1984) (individual not entitled to credit for time spent receiving therapy as a condition of probation).
Affirmed.
