
29 P.3d 914 (2001)
96 Hawai`i 195
STATE of Hawai`i, Plaintiff-Appellee,
v.
Ropati TAUILIILI, Defendant-Appellant.
No. 23008.
Supreme Court of Hawai`i.
August 9, 2001.
*915 Theodore Y.H. Chinn, on the briefs, Deputy Public Defender, for defendant-appellant.
James M. Anderson, on the briefs, Deputy Prosecuting Attorney, (Adrian Dhakhwa, Law Clerk, with him on the brief) for plaintiff-appellee.
MOON, C.J., and LEVINSON, NAKAYAMA, RAMIL, and ACOBA, JJ.
Opinion of the court by RAMIL, J.
The defendant-appellant Ropati Tauiliili appeals from the post-judgment order of the first circuit court, the Honorable Victoria S. Marks presiding, partially denying his motion seeking presentence credit for time served. On appeal, Tauiliili claims that the circuit court incorrectly interpreted HRS § 706-671, by failing to credit his 853 days of presentence imprisonment toward each of his three sentences.
We hold that the first circuit court (1) did not abuse its discretion when it partially denied Tauiliili's motion seeking presentence credit for time served and (2) properly applied Tauiliili's presentence credit once against the aggregate of his consecutive sentences. Accordingly, we affirm the judgment of the first circuit court.

I. BACKGROUND

On April 28, 1999, Tauiliili pled guilty to the following charges: Count Iassault in the first degree, in violation of Hawai`i Revised Statutes (HRS) § 707-710 (1993);[1] Count IIplace to keep firearm in violation of HRS § 134-6(c) and (e) (1993);[2] and Count IIIterroristic threatening in the first degree, in violation of HRS § 707-716(1)(d) (1993).[3] The guilty pleas were entered pursuant to a plea agreement with the prosecution.
*916 On June 29, 1999, the circuit court sentenced Tauiliili to 10 years' indeterminate imprisonment for Count I, 10 years' indeterminate imprisonment for Count II, and 5 years' indeterminate imprisonment for Count III. The circuit court ordered the sentences for Counts I and II to run concurrently and the sentence for Count III to run consecutively to the sentences for Counts I and II. The court also ordered that Tauiliili serve a mandatory minimum of 5 years for Count I and 3 years for Count III.
On August 13, 1999, Tauiliili filed a motion seeking an order granting presentence credit for time served. In his motion, Tauiliili requested that his 853 days of presentence detention be credited toward each his three sentences, including his consecutive sentence. In support of his motion, Tauiliili claimed that "no law . . . declares that presentence credit shall not be given for cases running consecutively" and, therefore, that he was entitled to credit against each sentence.
On August 24, 1999, the circuit court held a hearing on the motion. On November 18, 1999 and November 29, 1999, the court entered its findings of fact, conclusions of law, and orders granting the motion in part and denying it in part.[4] The court acknowledged that Tauiliili was entitled to credit for presentence detention time. In interpreting HRS 706-671, however, the court concluded that Tauiliili was not entitled to a presentence imprisonment credit toward each consecutive sentence. The court entered the following conclusions of law:
3. The intention of H.R.S. Section 706-671 would be met if credit for time served is subtracted from the sum of the consecutive sentence in this case. For example, Defendant's MAXIMUM TERM should be calculated as:


  Count I and II (concurrent) =   10 year maximum
  Count III (consecutive)       +  5 year maximum
                              ____________________
  SUM OF SENTENCE             =   15 year maximum
  Credit for time served        - 853 days
                              _____________________
  MAXIMUM TERM                =   12 Yrs 8 Mos

Defendant's MANDATORY MINIMUM TERM should be calculated as:


  Count I                =        5 year maximum
  Count III (consecutive)      +  3 year maximum
                              ___________________
  SUM OF SENTENCE        =        8 year maximum
  Credit for time served       - 853 days
                              ___________________
  MANDATORY MINIMUM
     TERM     =         5 Yrs 8 Mos

The circuit court also determined that the legislative purpose of HRS § 706-671 is to "put a defendant who has been incarcerated presentence in the same position that a defendant would be in if he were not incarcerated presentence." The court further concluded that the credit for time served had been applied to all offenses, thereby placing Tauailiili in the same position as he would have been had he been sentenced the day he was taken into custody.

II. STANDARDS OF REVIEW


A. Statutory Interpretation

"[T]he interpretation of a statute is a question of law reviewable de novo." State v. Wang, 91 Hawai`i 140, 141, 981 P.2d 230, 231, reconsideration denied, 90 Hawai`i 441, 978 P.2d 879 (1999) (quoting Gray v. Administrative Dir. of Court, 84 Hawai`i 138, 144, 931 P.2d 580, 586 (1997) (citations and ellipses omitted)).
When construing a statute, our foremost obligation is to ascertain and give effect to the intention of the legislature, which is to be obtained primarily from the language contained in the statute itself. And we must read statutory language in the context of the entire statute and construe it in a manner consistent with its purpose.
When there is doubt, doubleness of meaning, or indistinctiveness or uncertainty of an expression used in a statute, an ambiguity exists. . . .
In construing an ambiguous statute, "[t]he meaning of the ambiguous words may be sought by examining the context, with which the ambiguous words, phrases, and sentences may be compared, in order to ascertain their true meaning." HRS § 1-15(1) [(1983)]. Moreover, the courts may resort to extrinsic aids in determining legislative intent. One avenue is the use of legislative history as an interpretive tool. *917 Gray, 84 Hawai`i at 148, 931 P.2d at 590 (quoting State v. Toyomura, 80 Hawai`i 8, 18-19, 904 P.2d 893, 903-04 (1995)) (brackets and ellipsis points in original) (footnote omitted). This court may also consider "[t]he reason and spirit of the law, and the cause which induced the legislature to enact it . . . to discover its true meaning." HRS § 1-15(2) (1993). "Laws in pari materia, or upon the same subject matter, shall be construed with reference to each other. What is clear in one statute may be called upon in aid to explain what is doubtful in another." HRS § 1-16 (1993).
Ho v. Leftwich, 88 Hawai`i 251, 256-57, 965 P.2d 793, 798-99 (1998) (quoting Korean Buddhist Dae Won Sa Temple v. Sullivan, 87 Hawai`i 217, 229-30, 953 P.2d 1315, 1327-28 (1998) (quoting State v. Cullen, 86 Hawai`i 1, 8-9, 946 P.2d 955, 963-64 (1997) (some brackets in original and some added))).

B. Sentencing

"[A] sentencing judge generally has broad discretion in imposing a sentence. The applicable standard of review for sentencing or resentencing matters is whether the court committed plain and manifest abuse of discretion in its decision." Keawe v. State, 79 Hawai`i 281, 284, 901 P.2d 481, 484 (1995) (citations omitted). Factors that indicate a "plain and manifest abuse of discretion" are "arbitrary or capricious actions by the judge and a rigid refusal to consider the defendant's contentions." State v. Fry, 61 Haw. 226, 231, 602 P.2d 13, 17 (1979). In general, "to constitute an abuse it must appear that the court clearly exceeded the bounds of reason or disregarded rules or principles of law or practice to the substantial detriment of a party litigant." Keawe, 79 Hawai`i at 284, 901 P.2d at 484 (quoting State v. Gaylord, 78 Hawai`i 127, 144, 890 P.2d 1167, 1184 (1995) (citation and internal quotation marks omitted)).

III. DISCUSSION

The issue presented on appeal is whether a criminal defendant is entitled to presentence imprisonment credit against each sentence where there are two or more consecutive sentences. In assessing whether the circuit court properly partially denied Tauiliili's motion seeking presentence credit for time served, we must first consider the statutory language contained in HRS § 706-671 itself. HRS § 706-671 requires the court to apply credit for time served against a defendant's sentence term. HRS § 706-671 provides in relevant part:
(1) When a defendant who is sentenced to imprisonment has previously been detained in any State or local correctional or other institution following the defendant's arrest for the crime for which sentence is imposed, such period of detention following the defendant's arrest shall be deducted from the minimum and maximum terms of such sentence. The officer having custody of the defendant shall furnish a certificate to the court at the time of sentence, showing the length of such detention of the defendant prior to sentence in any State or local correctional or other institution, and the certificate shall be annexed to the official records of the defendant's commitment.

A. Credit for Minimum and Maximum Terms

The statutory language read in the context of the entire statute requires that presentence credit be applied to both the minimum and maximum imprisonment terms. In computing the terms of imprisonment, the circuit court properly applied Tauiliili's presentence credit by deducting 853 days from both the minimum and maximum terms of his sentence. In its brief, the prosecution concedes that, pursuant to HRS § 706-671, credit for time served must be applied against the minimum term, as well as the maximum term of imprisonment.

B. Credit Due on Each of the Consecutive Sentences

Tauiliili, however, claims that the sentencing court abused its discretion by refusing to grant presentence credit for each of his consecutive sentences. In his opening brief, Tauiliili suggests that HRS § 706-671 entitles him to presentence credit with respect to each sentence imposed in connection with Counts I, II, and III. We disagree.
*918 The commentary to HRS § 706-671 states in relevant part that "[t]his section provides for a result which the Code deems fair" and "provides for some equalization . . . between those defendants who obtain pre-sentence release and those who do not." Statutes giving credit for presentence confinement were designed to ensure equal treatment of all defendants whether or not they are incarcerated prior to conviction. In re Atiles, 191 Cal.Rptr. 452, 662 P.2d 910, 911 (Cal.1983). Granting presentence credit, therefore, seeks to place an in-custody criminal defendant who cannot afford to post bail in the same position as his counterpart with bail money. Nissel v. Pearce, 307 Or. 102, 764 P.2d 224, 226 (1988).
Once credit has been granted, no additional purpose is served by granting a second or "double credit" against a later consecutive sentence. State v. Cuen, 158 Ariz. 86, 761 P.2d 160, 162 (App.1988). Courts in other jurisdictions having similar statutes agree that a defendant who receives consecutive sentences is entitled to a presentence credit only once against the aggregate of the consecutive terms, while a defendant sentenced to concurrent terms in effect receives credit against each sentence. See Endell v. Johnson, 738 P.2d 769, 771 (Alaska App.1987); State v. Miranda, 108 N.M. 789, 779 P.2d 976 (1989); Nissel, 764 P.2d at 228; State v. Hoch, 102 Idaho 351, 630 P.2d 143 (1981).
Thus, when concurrent sentences are imposed, presentence credit is applied once. The credit applied once, in effect, is applied against each concurrent sentence. This is done because the longest term of the concurrent sentences determines the total length of the imprisonment. However, when consecutive sentences are imposed, credit for presentence imprisonment is properly granted against only the aggregate of the consecutive sentence terms.
In the present case, to allow multiple credit for consecutive sentences would defeat the legislative purpose underlying consecutive sentencing. Were this not so, the more consecutive sentences a criminal defendant received, the more credit he would accrue for presentence imprisonment. This would not be the result intended by the legislature, as this construction of the statute would actually penalize those who could afford to post bail and would thus defeat the purpose of "equalization" noted in the commentary to HRS § 706-671 (1993).
HRS § 706-668.5 (1993)[5] permits consecutive sentencing if multiple terms of imprisonment are imposed on a criminal defendant at the same time. The legislative purpose of the statute is to give the sentencing court discretion to sentence a defendant to a term of imprisonment to run either concurrently or consecutively. State v. Gaylord, 78 Hawai`i 127, 146, 890 P.2d 1167, 1186-1187 (1995). Discretionary use of consecutive sentences is properly imposed in order to deter future criminal behavior of the defendant, to insure public safety, and to assure just punishment for the crimes committed. Id. Absent clear evidence to the contrary, it is presumed that a sentencing court will have considered all factors before imposing concurrent or consecutive terms of imprisonment under HRS § 706-606 (1993).[6]*919 State v. Sinagoga, 81 Hawai`i 421, 427, 918 P.2d 228, 234 (App.1996).
In light of the underlying objectives of consecutive sentencing, Tauiliili was not entitled to receive credit on each of his consecutive sentences. Tauiliili's interpretation of HRS § 706-671 would undermine the sentencing court's decision to impose consecutive imprisonment terms. We do not believe that the legislature intended to allow a "double credit" for presentence confinement without expressly saying so. Accordingly, we hold that the circuit court correctly interpreted HRS § 706-671 by applying Tauiliili's 853 days of presentence credit only once against the aggregate of his consecutive sentences.

IV. CONCLUSION

For the foregoing reasons, we affirm the judgment of the first circuit court.
NOTES
[1]  HRS § 707-710 provides in relevant part that "[a] person commits the offense of assault in the first degree if the person intentionally or knowingly causes serious bodily injury to another person."
[2]  HRS § 134-6(c) provides that:

(c) Except as provided in sections 134-5 and 134-9, all firearms and ammunition shall be confined to the possessor's place of business, residence, or sojourn; provided that it shall be lawful to carry unloaded firearms or ammunition or both in an enclosed container from the place of purchase to the purchaser's place of business, residence, or sojourn, or between these places upon change of place of business, residence, or sojourn, or between these places and the following: a place of repair; a target range; a licensed dealer's place of business; an organized, scheduled firearms show or exhibit; a place of formal hunter or firearm use training or instruction; or a police station. "Enclosed container" means a rigidly constructed receptacle, or a commercially manufactured gun case, or the equivalent thereof that completely encloses the firearm.
. . . .
(e) Any person violating this section by carrying or possessing a loaded firearm or by carrying or possessing a loaded or unloaded pistol or revolver without a license issued as provided in section 134-9 shall be guilty of a class B felony. Any person violating this section by carrying or possessing an unloaded firearm, other than a pistol or revolver, shall be guilty of a class C felony.
[3]  HRS § 707-716(1)(d) provides in relevant part that "[a] person commits the offense of terroristic threatening in the first degree if the person commits terroristic threatening: (d) with the use of a dangerous instrument."
[4]  The November 18, 1999 and November 29, 1999 orders appear to be identical.
[5]  HRS § 706-668.5 (1993) provides:

Multiple sentences of imprisonment. (1) If multiple terms of imprisonment are imposed on a defendant at the same time, or if a term of imprisonment is imposed on a defendant who is already subject to an unexpired term of imprisonment, the terms may run concurrently or consecutively. Multiple terms of imprisonment imposed at the same time run concurrently unless the court orders or the statute mandates that the terms run consecutively. Multiple terms of imprisonment imposed at different times run consecutively unless the court orders that the terms run concurrently. (2) The court, in determining whether the terms imposed are to be ordered to run concurrently or consecutively, shall consider the factors set forth in section 706-606.
[6]  HRS § 706-606 (1993) provides in relevant part:

Factors to be considered in imposing a sentence. The court, in determining the particular sentence to be imposed, shall consider:
(1) The nature and circumstances of the offense and the history and characteristics of the defendant;
(2) The need for the sentence imposed:
(a) To reflect the seriousness of the offense, to promote respect for law, and to provide just punishment for the offense;
(b) To afford adequate deterrence to criminal conduct;
(c) To protect the public from further crimes of the defendant; and
(d) To provide the defendant with needed educational or vocational training, medical care, or other correctional treatment in the most effective manner;
(3) The kinds of sentences available; and
(4) The need to avoid unwarranted sentence disparities among defendants with similar records who have been found guilty of similar conduct.
