
    Joanna BLACK, Appellant, v. STATE of Alaska, Appellee.
    No. 3327.
    Supreme Court of Alaska.
    Oct. 7, 1977.
    ■ Leonard Thom Kelley, Anchorage, for appellant.
    Monica Jenicek, Asst. Dist. Atty., and Joseph D. Balfe, Dist. Atty., Anchorage, Av-rum M. Gross, Atty. Gen., Juneau, for ap-pellee.
    Before BOOCHEVER, Chief Justice, and RABINO WITZ, CONNOR, BURKE and MATTHEWS, Justices.
   OPINION

BOOCHEVER, Chief Justice.

On February 13, 1976, Joanna Black pleaded guilty to two counts of obtaining money by false pretenses, in violation of AS 11.20.360, and two counts of forgery, in violation of AS 11.25.020(1). Counts I and III were based on Ms. Black’s presentation of a check with forged endorsement in the amount of $235.51. Counts II and IV involve identical conduct with respect to a check in the amount of $265.00. The four counts thus involve the presentation of two checks.

The superior court judge sentenced Ms. Black to a total of fifteen years: five years each on Counts I and II (obtaining money by false pretenses) to be served concurrently, followed by five years on Count III (the first forgery), followed by five years on Count IV (the second forgery). The state in its confession of error concedes that under Whitton v. State, 479 P.2d 302 (Alaska 1970), the defendant could not be sentenced on both Counts I and III, or alternatively on both Counts II and IV. Even though the separate counts for each check represent two distinct acts (the forgery of the endorsement and the presentation of the check for payment), the conduct as to each check constitutes one transaction with a single intent to defraud. We therefore accept the state’s confession of error and find the duplicate sentencing illegal.

Since the sentence is void in its entirety, as illegal, resentencing will be necessary. For the purpose of giving guidance on resentencing, and in an attempt to avoid another appeal, we shall address the issue of excessiveness of sentence raised by Ms. Black. We find the sentence of fifteen years to be excessive. The judge was clearly mistaken in imposing such a lengthy sentence.

We have previously approved the American Bar Association’s recommendation that a maximum prison term exceed five years only in cases involving “particularly serious offenses” or especially dangerous offenders. Donlun v. State, 527 P.2d 472, 475 (Alaska 1974). In holding the sentence to be excessive, we do not mean to minimize the nature of the crime involved nor the defendant’s lengthy criminal record. Here, however, the particular offenses involved passing two bad checks to-talling about $500.00.

We find additional error in the trial court’s refusal to grant the defendant credit for time served from November 12, 1975, the time she was taken into custody, until February 13, 1976, the date of sentencing. The state confessed error on this point also, and AS 11.05.040(a) mandates granting the defendant such credit. The statute should control even when a sentence does not specifically provide for giving the credit, but in order to prevent problems arising when, as here, sentence is served outside Alaska, judges should include a provision granting such credit in the formal judgment.

This case is remanded for resentencing in conformity with this opinion.

REVERSED AND REMANDED. 
      
      . AS 11.20.360 provides:
      
        Obtaining money or property by false pretenses. A person who, by false pretenses or by a privy or false token, and with intent to defraud, obtains, or attempts to obtain money or property from another, or who obtains, or attempts to obtain, with intent to defraud, the signature of a person to a writing, the false making of which is a forgery, upon conviction, is punishable by imprisonment in the penitentiary for not less than one nor more than five years.
     
      
      . AS 11.25.020(1) states:
      
        Forgery of evidences of debt or uttering forged evidence of debt. A person who, with intent to injure or defraud another (1) makes, alters, forges, or counterfeits a bank bill, promissory note, draft, check, or other evidence of debt issued by a person or by the federal government, the state, a state or territory of the United States, or another state, government, or country, or by a corporation, company, or person authorized by law to issue evidence of debt; ... is punishable by imprisonment in the penitentiary for not less than one year nor more than 20 years.
     
      
      . See McCracken v. State, 521 P.2d 499, 511-12 (Alaska 1974).
     
      
      . This standard was articulated in McClain v. State, 519 P.2d 811, 813-14 (Alaska 1974). See also, Faulkner v. State, 445 P.2d 815 (Alaska 1968), decided prior to enactment of AS 12.55.-120 authorizing sentence review. In the case, a majority of the court found a sentence of five years, each on seven counts of drawing checks with insufficient funds with intent to defraud, and one year for a count of issuing checks without funds with the sentences to run consecutively to be excessive. Justice Dimond held that the sentence constituted cruel and unusual punishment, while Justice Rabinowitz relied on the inherent appellate power of the court to review sentences. Chief Justice Nes-bett dissented.
     
      
      . ABA Project on Minimum Standards for Criminal Justice, Sentencing Alternatives and Procedures, § 2.1 at p. 48 (Approved Draft, 1968); cf. State v. Chaney, 477 P.2d 441 (Alaska 1970).
     
      
      . Ms. Black had been convicted of twenty-two misdemeanor violations. Most appear to be related to prostitution. In addition, she has felony convictions for larceny and obtaining money by false pretenses. We note, however, that none of her crimes involved danger to the person of others.
     
      
      . AS 11.05.040(a) states in part:
      
        Computation of term of imprisonment and stay, (a) ... A person who is sentenced shall receive credit toward service of his sentence for time spent in custody pending trial or sentencing, or appeal, if that detention was in connection with the offense for which sentence was imposed. . . .
      Prior to that statute becoming effective, we applied the same rule in Thompson v. State, 496 P.2d 651, 656-57 (Alaska 1972).
     
      
      . Ms. Black also claims that the District Attorney, in alleged violation of an agreement not to make a sentence recommendation, told the court at the sentence hearing that “a significant period of time is necessary in terms of sentencing if the Court is to properly make an impression upon this particular defendant.” We find nothing in the record indicating an agreement not to make a general recommendation, although the District Attorney did state that he had agreed not to recommend a specific sentence. There was no violation of that agreement, and in any event, we see no necessity to reach this issue in light of our determination that the sentence as given is both illegal and excessive.
     