
91 Cal.App.3d 960 (1979)
155 Cal. Rptr. 11
In re RICHARD W., a Person Coming Under the Juvenile Court Law.
THE PEOPLE, Plaintiff and Respondent,
v.
RICHARD W., Defendant and Appellant.
Docket No. 4209.
Court of Appeals of California, Fifth District.
April 16, 1979.
*965 COUNSEL
Linda A. Schmidt, under appointment by the Court of Appeal, for Defendant and Appellant.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, Eddie T. Keller and Gary A. Binkerd, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
CREEDE, J.[*] 

STATEMENT OF THE CASE
A petition filed pursuant to Welfare and Institutions Code section 602[1] alleged two counts of burglary, a violation of Penal Code section 459, occurring on April 28, 1978, at the Sea Gypsy Motel in Pismo Beach. After a contested jurisdictional hearing on May 17, 1978, both counts of the petition were found true beyond a reasonable doubt and the burglaries were determined to be of the first degree. The court further found appellant came within the provisions of section 202, subdivision (b). On May 31, 1978, a dispositional hearing was held and appellant was committed to the Youth Authority, setting the maximum period of physical confinement at six years and four months.
Appellant appeals from the adjudication and disposition.

STATEMENT OF FACTS
On April 28, 1978, Raymond Gill was occupying room 120 of the Sea Gypsy Motel in Pismo Beach and was awakened by his barking dog. He went to the balcony, looked outside and saw a boy with blonde hair coming out of room 114 onto a balcony. Gill then saw another boy, whom he identified at trial as appellant, on the balcony 30 to 35 feet away. Gill watched while the two boys went to the wrought iron railing between two *966 rooms and jumped over the railing onto the balcony of room 112. Gill then asked the operator to call the police.
Officers of the Pismo Beach Police Department arrived at the motel within minutes. Officer Gary Drennan went to the beach side of the motel where he saw two persons standing on a balcony 15 yards away. He identified appellant at trial as one of those persons. As Drennan approached the two boys, both looked at him and jumped from the balcony. He ordered them to halt but they continued up some stairs and down a hallway.
In the meantime, Officers Griffith and Havard were proceeding down a stairwell on the other side of the motel. As they arrived at the bottom, they heard the sound of a person running and saw appellant proceeding toward them looking over his shoulder down the hallway. Appellant was detained and handcuffed. Soon thereafter Officers Drennan and Havard apprehended a second suspect, Robert C., who had shoulder-length blonde hair.
After the two boys were placed in the patrol car, Officer Griffith contacted Raymond Gill in room 120. Gill was asked for a physical description of the persons he had seen and if he could identify the persons in custody in the patrol car. Gill complied and identified the two boys as the persons he had seen previously on the balcony of room 114.
Appellant and the other suspect were searched at the scene of arrest. In appellant's pants pocket Griffith found $55.29 and a cigar cylinder, Black Watch brand. A search of the other suspect produced $53.18 and a bank deposit slip.
Jeffrey Budge, an occupant of rooms 202, 204 and 206 of the motel, testified that on the morning of April 28, 1978, he discovered his mother's purse was missing. The previous evening the purse had been on a couch in room 204 and, among other things, the purse contained the bank deposit slip found on the other suspect.
Audrey Martin, an occupant of room 114, testified that about 1 a.m. on April 28, 1978, she was awakened by a police officer knocking on her door. She discovered her purse had been moved from a table to the floor at the foot of the bed. A cylindrical cigar holder with a Black Watch design containing $3 in dimes together with $72 was missing.


*967 Was appellant denied his right to a fair and impartial hearing before an unbiased judge because the trial court previously accepted the admission of the other minor and later commented on prior proceedings in which appellant had been involved?

Appellant asserts a denial of his constitutional right to a trial by a detached, fair and impartial judge and one who is not biased against him. (U.S. Const., 5th Amend; Cal. Const., art. I, § 7, subd. (a); People v. Superior Court (Greer) (1977) 19 Cal.3d 255, 266 [137 Cal. Rptr. 476, 561 P.2d 1164].)
Appellant contends the trial judge was prejudiced against him because the court previously heard the admission of the other minor involved. Prejudice is attributed to a remark of the trial judge about having the minor before him previously as a prowler. Appellant suggests this reference indicates the court's impermissible consideration of appellant's prior record in finding the petition true.
If appellant's trial counsel had deemed that the judge assigned to hear the case was prejudiced, he had the ability to disqualify that judge under the provisions of Code of Civil Procedure section 170.6. This statute has been expressly held applicable to juvenile cases. (Pamela H. v. Superior Court (1977) 68 Cal. App.3d 916, 918 [137 Cal. Rptr. 612].)
(1) A party in juvenile as well as all other proceedings is entitled to a trial by a judge who is detached, fair and impartial and has a constitutional right not to be tried before a judge who is biased against him. (Adoption of Richardson (1967) 251 Cal. App.2d 222 [59 Cal. Rptr. 323].) If a judge discovers that he cannot avoid consideration of information from another proceeding, or from a hearsay or other source, the preservation of the proper image of justice requires the judge to either recuse himself from conducting the trial or reveal the particular information to the parties so that the person who is possibly affected may either object to the court's consideration of the case, waive possible grounds for disqualification, or otherwise lay aside the issue. (Code Civ. Proc., § 170, subd. 5; People v. Deutschman (1972) 23 Cal. App.3d 559, 566 [100 Cal. Rptr. 330]; Battaglia v. United States (9th Cir.1968) 390 F.2d 256, 259.) It is fully recognized that the judiciary must not only be impartial but should always appear impartial. (State of Cal. v. Kleppe (C.D.Cal. 1977) 431 F. Supp. 1344, 1350.) "Although defendant is afforded a peremptory challenge of a judge by Code of Civil Procedure section 170.6, there is no presumption in the law that the trial judge is *968 prejudiced. A trial judge hears many items during the course of a trial which are inadmissible, and he is called upon to rule on the admissibility of numerous evidentiary matters. The fact that he has heard these things does not mean that he cannot divorce them from his mind. To justify a mistrial, or a new trial, or a reversal on appeal, an affirmative showing of prejudice is required." (People v. Beaumaster (1971) 17 Cal. App.3d 996, 1009 [95 Cal. Rptr. 360].)[2] Appellant is precluded from raising this issue on appeal because a timely objection was not made at the trial level. Even if appellant could raise this issue, the record discloses no evidence supporting appellant's contention or showing the probable existence of prejudice as required by Code of Civil Procedure section 170, subdivision 5.
Appellant goes one step farther and contends that not only was the judge prejudiced, but the court also used the testimony of the other minor in the prior proceeding to reach the conclusion that appellant was guilty of two counts of burglary, thus utilizing improper hearsay and denying appellant the right to cross-examine and confront such witness. This contention is without merit. A judge is not disqualified to try a case merely because he previously, in a separate proceeding, heard a case of a coparticipant or passed on the application of a codefendant for probation. (People v. Kennedy (1967) 256 Cal. App.2d 755, 759 [64 Cal. Rptr. 345]; People v. Gibbs (1970) 12 Cal. App.3d 526, 537 [90 Cal. Rptr. 866].) The record does not reflect that any statement of the minor in the other action was considered by the court in making a determination of appellant's guilt. There is no affirmative showing that the admission of the companion in any way implicated the minor. We cannot assume from appellant's bare allegation that the coparticipant's admission was inculpatory as to appellant or was in some manner considered, much less that such separate proceeding improperly influenced the trial court. On the other hand, there is substantial evidence supporting the trial court's determination that appellant participated in the two burglaries alleged in the petition.
It is next contended that the comments of the trial court after finding both counts of the petition true demonstrate impermissible utilization of prior proceedings in weighing the evidence. After making the jurisdictional findings and ordering the minor detained, the court said: "This court makes a recommendation to the other judge that the minor be dealt *969 with in a manner that would protect the public. I think once we start burglarizing residences in the nighttime that you are asking for some severe problems. If I recall the last time you were in this court you were a prowler going around looking in people's windows, or something like that. I don't recall specifically, but it seems to me it was something similar to that. And the story was then you were cutting through somebody's yard and under all the circumstances the court could not  did not buy that argument. Here we are back here where you are actually going inside of a building and you are taking people's property." (Italics added.)
The court made a specific finding that the public should be protected from the minor pursuant to section 202, subdivision (b), and recommended that the minor's case be dealt with accordingly at the disposition hearing. The trial court's statement at most establishes that the judge had a vague recollection of the minor previously being before him as a prowler and in a postadjudication comment pointed out the minor had progressed to more serious violations of law. It is not inappropriate for a juvenile judge, after announcing the decision, to comment on his concern about the minor's progress into more serious violations of law. (In re Gault (1967) 387 U.S. 1 [18 L.Ed.2d 527, 87 S.Ct. 1428] and its progeny do not require the juvenile court to be so detached as to be unconcerned about the seriousness of the offense and what appeared to be a distinct escalation in the gravity of the violation in contrast to a past proceeding of relatively minor significance.) Appellant's reliance on In re Gladys R. (1970) 1 Cal.3d 855 [83 Cal. Rptr. 671, 464 P.2d 127] is misplaced. In In re Gladys R., the court reviewed and considered the social report containing unfavorable and potentially prejudicial material before the jurisdictional hearing in violation of sections 701, 702 and 706. No such circumstance is present here. Appellant's contentions that the trial court was prejudiced, considered hearsay or other improper matters in reaching its decision are without merit.

(2a) Was the out-of-court field identification in the patrol car a few minutes after the boys were observed impermissibly suggestive and was appellant entitled to counsel at this stage?

Appellant contends the fact witness Gill identified appellant while he was sitting in the back of a patrol car shortly after the burglaries makes that identification inadmissible because the circumstances of the identification were impermissibly suggestive. Richard argues the in-field identification was too suggestive in that it exhibited only the minor and his companion handcuffed inside a police car with officers standing around, *970 citing People v. Sandoval (1977) 70 Cal. App.3d 73, 85 [138 Cal. Rptr. 609] for the proposition that a "`single person showup'" should not be used without a compelling reason. Sandoval did not involve an in-the-field identification, and the rationale of cases upholding in-field identifications justifies single person showups so long as the procedures used do not give rise to impermissible suggestion, a determination to be made in the light of all the circumstances of the case. (People v. Sandoval, supra, at p. 85.) Appellant overlooks the fact that the law favors field identification measures when in close proximity in time and place to the scene of the crime, with the rationale for the rule being stated: "The potential unfairness in such suggestiveness, however, is offset by the likelihood that a prompt identification within a short time after the commission of the crime will be more accurate than a belated identification days or weeks later. Furthermore, because the problem is inherent in such confrontations, the choice is between prohibiting all in-the-field identifications or permitting them notwithstanding the element of suggestiveness. The choice involves a balancing of the interests of fairness to criminally accused persons and prompt, proper and efficient law enforcement, and the choice has properly been made to permit in-the-field identifications, because the immediate knowledge whether or not the correct person has been apprehended is of overriding importance and service to law enforcement, the public and the criminal suspect himself." (People v. Anthony (1970) 7 Cal. App.3d 751, 764-765 [86 Cal. Rptr. 767]; see also Stovall v. Denno (1967) 388 U.S. 293 [18 L.Ed.2d 1199, 87 S.Ct. 1967].) Other cases have similarly held that in-field identifications when the suspect was in the back of a patrol car or handcuffed are admissible. (See People v. Craig (1978) 86 Cal. App.3d 905, 914 [150 Cal. Rptr. 676]; People v. Colgain (1969) 276 Cal. App.2d 118, 122, 129 [80 Cal. Rptr. 659]; People v. Smith (1970) 13 Cal. App.3d 897, 909 [91 Cal. Rptr. 786, 52 A.L.R.3d 875]; People v. Rodriguez (1970) 10 Cal. App.3d 18, 27 [88 Cal. Rptr. 789]; People v. Levine (1969) 276 Cal. App.2d 206, 208 [80 Cal. Rptr. 731].) Where the defendant claims the pretrial identification is unnecessarily suggestive, he must show it gave rise to a very substantial likelihood of misidentification. (Simmons v. United States (1968) 390 U.S. 377, 384 [19 L.Ed.2d 1247, 1253, 88 S.Ct. 967].)
(3) "Where it is asserted under the Stovall rule that the pretrial identification procedure was so unfair as to taint the in-court identification, the proper procedure requires that the trial court determine initially, ... whether such procedure was unfair. [Citation.] This procedure, since it is invoked on grounds of due process, requires that the defendant demonstrate that the pretrial confrontation `resulted in such unfairness *971 that it infringed his right to due process of law.' [Citations.] The resolution thereof depends upon a consideration of all the facts and circumstances. [Citations.] If there are conflicting factual versions, the conflict must be resolved by the trial judge." (People v. Rodriguez, supra, 10 Cal. App.3d at p. 30.)
(2b) Richard's counsel attacked the strength of Gill's identification on cross-examination. Appellant's contention that Gill's in-court identification was based on his view in the car and not upon the balcony is unsupported. There is no substantial likelihood of irreparable misidentification in this case. The circumstantial evidence that appellant was a principal in the burglaries is strong and persuasive. The procedures used by the police were justified by the nature of the circumstances.
(4) For many of the same reasons just discussed, the courts have also held that the right to counsel is not required for a field identification. "The rationale of these decisions is the great reliability of on-the-spot identification by the victim; the service to law enforcement, the public and the criminal suspect of knowing promptly whether the right person has been apprehended; and the practical impossibility of representation by counsel at an immediate in-the-field identification." (People v. Anthony, supra, 7 Cal. App.3d at p. 764; see also People v. Rodriguez, supra, 10 Cal. App.3d at p. 29.) Appellant was not denied right to counsel during the field identification by Gill and the evidence of that identification was properly admitted.

Was testimony concerning a deposit slip found on the other minor inadmissible hearsay and, if so, may an objection be raised for the first time on appeal?
Witness Jeffrey Budge identified a deposit slip found on the person of the other minor at the time of arrest as one he had given his mother to deposit to his account. Appellant claims that the following question and answer are inadmissible hearsay:
"Q. [Prosecutor] What piece of personal property, or personal documents had you previously given your mother at any time?
"A. At that time my mother had a deposit slip from my bank which she had deposited in my bank account in La Jolla where I lived during the summer and she had, I believe, my phone number in her purse." And further:
*972 "Q. How do you recognize that and what connection, if any, do you have knowledge of its being in your mother's purse?
"A. That it has my account number on it. It was a deposit slip that I asked my mother to put a hundred dollars in my checking account previously to our coming up."
The prosecutor then proceeded to show the witness the deposit slip found on the person of the other minor who said it had his account number on it. The questions and answers, therefore, were obviously part of the foundation being laid for the introduction of the deposit slip. Appellant, however, misconstrues the quoted answers as "explaining how he [the witness] had knowledge that the deposit slip was in his mother's purse."
The question and answer challenged is not hearsay, for there is no "statement that was made other than by a witness while testifying at the hearing and that is offered to prove the truth of the matter stated." (Evid. Code, § 1200.) Instead, this was merely circumstantial evidence to show that the deposit slip was in the possession of Budge or his mother (whether in her purse or elsewhere). The fact appellant's accomplice had this deposit slip on his person just outside the motel where the Budges were staying is circumstantial evidence they had broken into the Budges' rooms. The fact the slip bore Budge's account number was within his personal knowledge and nonhearsay. Its importance was to connect appellant and his companion to the unlawful entry.
(5) Moreover, assuming appellant's construction of the answer is accepted, he is barred from raising this issue on appeal because no objection was made at the trial level. (See Witkin, Cal. Evidence (2d ed. 1966) Introduction of Evidence at Trial, § 1285, p. 1188.) Appellant's reliance on People v. Williams (1971) 22 Cal. App.3d 34 [99 Cal. Rptr. 103] as authority for the ability to raise inadmissibility of evidence for the first time on appeal is misplaced. Williams involved a case where the failure to object had no tactical basis, had the effect of withdrawing a crucial defense, and thus constituted ineffective representation of counsel. Such circumstance is not present in this case. Therefore, admission of the evidence in question did not constitute prejudicial error.

Was there substantial evidence to support a finding that appellant was guilty of two burglaries?
Appellant contends that the evidence in the record is "not sufficient to establish beyond a reasonable doubt" that appellant was guilty of two *973 counts of burglary. This is referring to the standard of proof to be followed by the trial court, and not that of review on appeal. (6) Rather, the test on appeal is whether there is substantial evidence to support conclusion of the trier of fact. (People v. Redmond (1969) 71 Cal.2d 745, 755 [79 Cal. Rptr. 529, 457 P.2d 321].) Part of appellant's contention is based on the assumption that the identification of appellant and the testimony as to the deposit slip were not legally admissible. As discussed, however, this evidence was admissible and can therefore be used to support the judgment. Even if Richard's contention that evidence did not exist showing he entered both rooms is accepted, appellant still could be found to be principal as an aider and abetter in the burglary of both rooms. (7) The presence of the boys on the balcony adjacent to recently entered motel rooms in the early morning hours, their flight after being ordered to halt, considered with their possession of property belonging to sleeping occupants of the motel, is strong evidence of their mutual participation in the burglaries. There is substantial evidence to support the finding appellant was guilty of two counts of burglary in the first degree.

Was appellant denied effective representation of counsel?
Appellant correctly points out that under the Sixth Amendment of the United States Constitution and article I, section 13, of the California Constitution the right to counsel means "counsel `reasonably likely to render, and rendering reasonably effective assistance.'" (In re Saunders (1970) 2 Cal.3d 1033, 1041 [88 Cal. Rptr. 633, 472 P.2d 921]; In re Williams (1969) 1 Cal.3d 168, 175-176 [81 Cal. Rptr. 784, 460 P.2d 984]; People v. Whittington (1977) 74 Cal. App.3d 806, 820 [141 Cal. Rptr. 742].) In People v. Pope (1979) 23 Cal.3d 412 [152 Cal. Rptr. 732, 590 P.2d 859], our Supreme Court has adopted the reasonably competent representation test to determine whether a defendant has received effective representation of counsel and rejected the much criticized "farce or sham" criteria of People v. Ibarra (1963) 60 Cal.2d 460 [34 Cal. Rptr. 863, 386 P.2d 487]. Appellant still retains the burden of proving his claim of inadequate trial assistance. (8) "Thus, appellant must show that trial counsel acted or failed to act in a manner to be expected of reasonably competent attorneys acting as diligent advocates. In addition, appellant must establish that counsel's acts or omissions resulted in the withdrawal of a potentially meritorious defense." (People v. Pope, supra, 23 Cal.3d 412, 425.)
*974 Appellant has failed to make such a showing here. The "errors" trial counsel is alleged to have committed are: (1) the failure to object to introduction of the testimony concerning the deposit slip and of the identification of appellant by Gill; (2) the failure of defense counsel to challenge the credibility of certain witnesses through further questioning; and (3) counsel misspoke as to the amount of cash taken from one of the rooms. The first criticism of trial counsel's tactics is not viable because the evidence concerning the deposit slip was not objectionable and it was foundational for the witness' ability to identify the slip. As has been previously considered, there was no unfairness in the on-scene identification procedures and an objection would have been to no avail. A failure to raise all potential objections or methods of impeachment does not constitute inadequate trial assistance.
(9) Appellant's argument that defense counsel elicited facts in the cross-examination of Gill which aided the identification does not demonstrate action less than that to be expected of "reasonably competent attorneys acting as diligent advocates." Any suggestiveness in the circumstance of the identification necessarily went to the weight of the evidence and the accuracy and reliability of the witness which counsel pursued on cross-examination. Appellant's trial attorney obviously made a choice of tactics in attempting (unsuccessfully) to attack the solidity of Gill's identification testimony. The most diligent, ordinarily prudent lawyer may not significantly weaken identification testimony and may, as occurred here, enhance the testimony by further exploring the subject. Counsel pursued the principal avenue of defense, i.e., the accuracy of the identification which any reasonably competent attorney would have chosen.
Appellant makes no showing on appeal that trial counsel did not choose to have appellant's case tried before the same judge as heard the accomplice's admission as a matter of sound judgment or trial tactics or that a reasonably competent and experienced counsel would not have done so. Nor does appellant show how he and his accomplice had conflicting interests in order for the principles of People v. Chacon (1968) 69 Cal.2d 765 [73 Cal. Rptr. 10, 447 P.2d 106, 34 A.L.R.3d 454] to apply. To merely urge there was potential for counsel error in these areas is not sufficient to establish that appellant was denied effective representation.
Given the facts of this case, appellant's contentions that counsel should have made objections at the detention hearing because of lack of probable cause for arrest and failure to show a prima facie case are *975 unfounded. Nor were there errors in the dispositional hearing which require a finding that appellant was denied effective representation of counsel. While only abbreviated statements were made on behalf of the minor prior to disposition, counsel did point out that appellant believed he should have an opportunity to be tried in a group home. The comprehensive social report was before the court. We reject appellant's claim that he was denied effective representation of counsel under the rule of People v. Pope, supra, 23 Cal.3d 412.[3] Counsel did the best he could in face of overwhelming circumstantial as well as direct evidence of guilt.

Did the court properly aggregate appellant's terms of commitment on multiple petitions by giving him adequate notice that the prior charges would be used to compute the commitment?
Appellant contends it is impermissible to utilize previously adjudicated offenses in fixing the maximum period of physical confinement. (§ 726, Cal. Rules of Court, rule 1373(b).)[4] The social report recommended that appellant's commitment include time for previously sustained violations. Prior to the dispositional hearing, appellant's counsel received and reviewed the report. Appellant argues such notice is inadequate to give the minor timely notice of the "possible consequences." (§ 700, rule 1353(a).)
The record reflects no notice was given to appellant of an election to consider "previously sustained petitions" in fixing the "maximum term of imprisonment" prior to receipt of the social report.
(10) It is apparent section 726 specifically authorizes aggregating periods of confinement attributable to previously sustained petitions.[5] The case of In re Aaron N. (1977) 70 Cal. App.3d 931 [139 Cal. Rptr. 258], decided before section 726 was amended to permit such aggregation, does *976 not, as appellant urges, hold otherwise. This section was amended effective October 1, 1977, to permit, at the election of the court, aggregating the period of confinement on multiple counts and petitions including "previously sustained petitions." The statute also was amended to prescribe the computation of such periods of confinement substantially in conformity with the Determinate Sentence Act applicable to adult offenders. (Stats. 1977, ch. 1238, § 1.)
In the present case, in addition to the current petition, there were three previously sustained petitions. Appellant relies on In re Aaron N., supra, 70 Cal. App.3d at page 941, where it was held that "before a minor may be committed to the Youth Authority based on his entire record and/or that the maximum term should be governed by some prior criminal act for which a petition has been sustained, the court must advise the minor of its intention to do so and afford the minor an opportunity to be heard prior to the commitment." Respondent urges that appellant received such notice prior to the disposition hearing in the social report recommending that the maximum term of confinement reflect periods attributable to all previously sustained petitions. In re Aaron N., as well as section 726, are silent on when such advice should be given, i.e., the detention (arraignment) hearing, trial confirmation or setting proceeding, if any, adjudication or dispositional hearings. In dealing with a contention that a disposition based on the entire record of the minor was improper, In re Amott M. (1978) 86 Cal. App.3d 338, 340 [150 Cal. Rptr. 205],[6] determined that "The purpose of the notification called for in In re Aaron N., supra, is not to assist the minor in making a tactical decision whether to admit or deny the allegation of the petition but to enable the minor, in the dispositional hearing, to meet and explain derogatory material in the `entire record.'" Respondent argues notice of intention need not be given before the jurisdictional hearing and it is only required that such notice be given and the minor afforded an opportunity to be heard "prior to the commitment." Obviously, the minor in Amott M. misconstrued the rule of Aaron N. because it has been the time-honored perogative of the court in either juvenile or criminal actions to consider the entire record of previously adjudicated petitions, or convictions in the case of an adult, in arriving at a fair and just disposition or sentence respectively.
*977 In re Samuel C. (1977) 74 Cal. App.3d 351 [141 Cal. Rptr. 431] holds that under the 1976 amendment to section 726, effective January 1, 1977, Juvenile Court Rules (Cal. Rules of Court, rule 1373), effective July 1, 1977, and under In re Aaron N. it is incumbent upon the trial court to specify at the time of disposition whether the commitment to the Youth Authority is based upon prior offenses. In re Samuel C. did not specifically deal with the issue of when in the course of the proceedings the minor was entitled to notice of intention to consider his prior record in determining the period of confinement.[7]
In re Aaron N., supra, 70 Cal. App.3d 931 based its holding requiring notice of intention to aggregate periods of confinement on the well-settled principles "that juvenile proceedings which may result in substantial loss of personal freedom are regarded as quasi-criminal in nature, and as a consequence the fundamental notions of due process and fairness must be strictly observed [citations]." (Id., at p. 941.) It is essential to avoid even the appearance of unfairness to maintain an atmosphere consistent with the goals of the juvenile law. (See In re Gault, supra, 387 U.S. 1, 26 [18 L.Ed.2d 527, 545, 87 S.Ct. 1428].) Due process requires "that a minor, like an adult, have adequate notice of the charge so that he may intelligently prepare his defense." (In re Arthur N. (1976) 16 Cal.3d 226, 233 [127 Cal. Rptr. 641, 545 P.2d 1345].) Neither In re Aaron N. nor In re Amott M. dealt with the provisions of sections 775, 776 and 777, the statutory provisions for notice of consequences, nor compliance with Juvenile Court Rules.[8]
Section 700 provides that, "At the beginning of the hearing ... upon request ... the judge shall explain any term of allegation contained therein and the nature of the hearing, its procedures, and possible consequences." Rules 1324(a)(3) and 1353(a), based on sections 633 and 700, require that "... the court shall inform the minor and the parent or guardian, if present, ..." at the detention hearing of "(3) The nature of, and possible consequences of juvenile court proceedings." (Rule 1324(a).) At the adjudication hearing, "The court shall then explain the meaning *978 and contents of the petition and the nature of the hearing, its procedures and possible consequences." (Rule 1353(a); italics added.) Section 656, subdivisions (c) and (f), specify the petition to commence proceedings must contain: "(c) The code section or sections and subdivision or subdivisions under which the proceedings are instituted" and "(f) A concise statement of facts, separately stated, to support the conclusion that the minor upon whose behalf the petition is being brought is a person within the definition of each of the sections and subdivisions under which the proceedings are being instituted." Section 656.1 states: "Any petition alleging that the minor is a person described by Section 602 shall specify as to each count whether the crime charged is a felony or a misdemeanor." Section 702 and rules 1355(f)(5) and 1373(a) require a determination of the degree of the offense and whether it would be a misdemeanor or a felony if committed by an adult.[9]
When read together, sections 656, 656.1, 700, 702, 776 and 777 demonstrate a clear legislative intent to require advice to the minor of possible consequences, including the maximum period of physical confinement, at the detention or jurisdictional hearing, or at some point before an admission is accepted or a contested jurisdictional hearing commences. (See also rules 1324(a)(3) and 1353(a).)[10]
Section 777 pertaining to a supplemental petition for modification "did not contemplate that [such] section must, necessarily, be utilized in cases such as the one at bench where a different and more onerous disposition is to be based on a new criminal offense." (Italics added.) (In re John G. (1977) 72 Cal. App.3d 242, 245 [139 Cal. Rptr. 849]; In re Arthur N., supra, 16 Cal.3d 226, 233; In re Reynaldo R. (1978) 86 Cal. App.3d 250, 256 [150 Cal. Rptr. 71].) (11) However, in the absence of the filing of a supplemental petition under section 777 to formally bring before the court the ineffectiveness of the previous dispositions in light of the new offense, the court is limited to fixing a maximum period of confinement based on the new offenses. It is implicit from an analysis of these statutory provisions and rules that if a supplemental petition for modification is not filed under section 777, the minor's entire record of petitions adjudicated to be true may be considered in making an appropriate disposition for the most recent offense, i.e., the counts of Penal Code section 459, but not in aggregating the period of confinement. *979 To decide otherwise would lead to the remarkable conclusion that a minor who comes before the court charged with a misdemeanor with a ninety-day or six-month period of confinement, but having previously adjudicated felony violations, being exposed to the potential of multiple years in confinement without previous notice until at or shortly before the dispositional hearing.
We are not dealing with a consideration of prior offenses in making a more severe disposition for the offense which is the subject of the most recent petition, but in setting the maximum period of confinement based on notice in accordance with statutory and rule provisions. The petitioner should not be allowed to change the rules in the middle of the ball game. This would not be tolerated by youngsters playing sandlot ball and certainly does not comport with basic principles of fairness codified in the statutes and rules which should, above all else, guide us in juvenile proceedings. An adult could not be subjected to a period of confinement beyond that prescribed for crimes specifically charged and proven and no sound reason exists why a different rule should apply to a minor. The Attorney General's argument that giving the minor notice of intent to aggregate periods of confinement from prior offenses, by service of the social report, is rejected. No supplemental petition was filed and the record is silent as to any admonition of such consequences. It does not otherwise appear the minor was aware of the possible aggregation prior to receipt of the social report at the disposition hearing. We agree with appellant that timely notice of the consequences prescribed by the rules was not given if petitioner sought aggregation or such election was to be requested of the court.
The minutes of the detention hearing of May 3, 1978, state: "Minor was advised of his legal and constitutional rights" but there is no indication he was informed of the "possible consequences." (Cf. rule 1324(a)(3).) The minutes of the jurisdictional hearing on May 17, 1978, contain a similar statement concerning advice "of his legal and constitutional rights" which is not supported by the reporter's transcript. (Cf. rule 1353(a).) A reading of the petition was waived, but the record does not affirmatively show compliance with rules 1324(a)(3) or 1353(a) at either the detention or adjudication hearings. A further flaw is that the court found the burglaries to be of the first degree based on a petition containing no allegation of a nighttime burglary under Penal Code section 460, subdivision 1. There was no request to amend or to conform to proof. No challenge to the variance was raised at trial or on appeal. An informal amendment must be deemed to have been accomplished and the issue is not before us.
*980 Appellant has not established the existence of prejudice from the failure to comply with the Juvenile Court rules with respect to advice of the consequences of the petition concerning the possibility of aggregation. (In re Ronald E., supra, 19 Cal.3d 315; People v. Watson (1956) 46 Cal.2d 818, 836 [299 P.2d 243].) We do not believe it is reasonably probable that if such admonition as to possible consequences had been given there would have been any different course of action or result achieved in view of the overwhelming evidence of appellant's participation in two clearly proven nighttime burglaries. However, the failure to file a supplemental petition, as required by section 777, requires reversal of the findings of the maximum period of confinement insofar as it utilizes periods from previously sustained petitions to aggregate the term beyond that specified for the new offenses. If previously sustained petitions were to be utilized in aggregation, a supplemental petition for modification should have been filed (§§ 776 and 777) giving notice to the minor that such previous petitions would be used to extend the maximum period of confinement beyond that prescribed by the felony burglary counts alleged in the petition.

Was appellant's total confinement time set impermissibly long?
Appellant argues that the lower court could not extend the commitment time for the prior offenses. We agree. In re Aaron N., supra, 70 Cal. App.3d 931 and In re Samuel C., supra, 74 Cal. App.3d 351 based their conclusions on sections 726 and 731. However, these sections merely limit the maximum term of a commitment which may be imposed on a juvenile. They do not purport to consider the statutory requirements for the filing of a supplemental petition and notice of consequences now encompassed in the Juvenile Court Rules. The trial proceedings in both In re Aaron N. and In re Samuel C. were conducted prior to the 1976 amendments effective January 1, 1977, and the Juvenile Court Rules, rule 1373, effective July 1, 1977. The Legislature's delineation of the procedure to be used in the event a prior order is to be modified was not raised or considered. (See conc. opn. In re Reynaldo R., supra, 86 Cal. App.3d at p. 258.)
Section 726, subdivision (c), provides that a minor may be confined for a period not to exceed the maximum term of imprisonment which could be imposed on an adult "convicted of the offense or offenses which brought or continued the minor under the jurisdiction of the juvenile court." The court in In re Aaron N. stated that where a minor "violates several provisions of criminal law by his repeated misconduct for which he is declared a ... ward of the court, each and every criminal violation *981 may constitute the offense which brings him under the jurisdiction of the juvenile court and may serve as a measurement for his physical confinement...." (In re Aaron N., supra, at p. 939.)[11] "All that is required for proper notice is that the supplemental petition plead a concise statement of facts sufficient to support the conclusion that the previous disposition has not been effective in the minor's rehabilitation, and notice of the time and place of the hearing on the petition. (§ 777, subds. (a), (b); ...)" (In re Reynaldo R., supra, 86 Cal. App.3d at p. 254.) "However, before a prior commitment order may be modified, an express finding by the court must be made that the previous disposition has not been effective in the rehabilitation of the minor. (In re Denise C. (1975) 45 Cal. App.3d 761, 766-767 [119 Cal. Rptr. 735].)" (In re Reynaldo R., supra, at p. 255.)
Appellant further suggests that the prior offenses may not be used in computing the commitment term because "there was no evidence introduced to support a finding that appellant had any prior convictions." (12) However, evidence of the records of conviction are included within records of "any court of this state" and therefore the trial court could have taken judicial notice of the prior offenses under Evidence Code section 452, subdivision (d). Furthermore, section 706 provides the court shall receive and consider the social study in evidence and such other relevant and material evidence as may be offered. (Rule 1371(b) and (d).) As previously discussed, we agree with appellant's contention because of failure to comply with section 777 and noncompliance with statutory and rule requirements for notice of consequences.
The trial court set the principal period of confinement as four years, the maximum term an adult could be sentenced to prison for first degree burglary under Penal Code section 461. An adult could not be sentenced to the four-year term absent a finding of aggravated circumstances, or statement of reasons for imposing consecutive terms. (Pen. Code, § 1170, subd. (b).) Section 726, subdivision (c), purports to excuse such a finding when setting the term of commitment for a juvenile. Although appellant's counsel on appeal has not challenged this discrepancy, the constitutionality of this aspect of section 726 is before the Supreme Court.[12]
*982 The trial court has discretion in setting the maximum period of confinement, and sections 726 and 731 and rule 1373(b) do not require that such aggregation occur in every case. Section 726, subdivision (c), merely sets the outer limit for such period of confinement. From the record it appears the judge made a rote calculation rather than exercising his discretion in fixing six years and four months as a period of confinement well beyond the court's period of jurisdiction (§§ 607, 1769, subd. (a), if no application for further detention is filed under §§ 1800-1803).[13] The trial court construed section 726 as requiring that the maximum period be set without the exercise of such discretion, and engaged in a "computation" of the term which it considered mandatory under section 726.
The trial court's additional period of one-year commitment for the second count of first degree burglary was proper under the method set forth in Penal Code section 1170.1 (one-third the middle term of three years) for a term an adult would receive for such a subordinate offense if there were an exercise of sound discretion in contrast to the mechanical act of computing the maximum term of confinement.
The cause will be remanded for further dispositional proceedings with instructions to the trial court to exercise its discretion in establishing the confinement period and to modify the inclusion of terms from previous petitions by reason of noncompliance with section 777. In the case of multiple offenses, on the most recent petition and those previously sustained if a petition for modification under section 777 is filed, such terms may be declared concurrent or the court may elect to aggregate if the circumstances warrant such action. It is recognized that a juvenile court commitment to the California Youth Authority is not for a determinate period; nevertheless, section 726 does not mandate consecutive aggregated terms in all cases, absent the exercise of sound discretion in so doing.
It cannot be determined whether there was compliance with section 731 prescribing that a minor committed to the Youth Authority may not be held in physical confinement for a period in excess of the maximum period of confinement which would be imposed on an adult because the record suggests the recitation of the maximum period of confinement without any statement or explanation which would demonstrate that discretion was in fact exercised and the reasons therefore. (13) A juvenile no less than an adult is entitled to have the term of confinement *983 established after the court has considered all the circumstances rather than engaging in mere computation. The fact that the term set greatly exceeded the court's jurisdiction in the absence of a petition under section 1800,[14] together with the record before us, indicates the trial judge did not exercise such discretion or at least the record does not show such exercise.
Appellant further contends he should be given credit for all time spent prior to commitment in juvenile hall from this commitment. The Second District has specifically rejected this contention in In re Leonard R. (1977) 76 Cal. App.3d 100 [142 Cal. Rptr. 632], stating that the applicable statute, Penal Code section 2900.5, does not apply to juvenile proceedings.[15] The principles set forth in People v. Olivas (1976) 17 Cal.3d 236 [131 Cal. Rptr. 55, 551 P.2d 375] would seem to require that youth commitments be reduced for precommitment time served, just as adult sentences are credited for presentence time served on the principles of equal protection. (In re Harm R. (1979) 88 Cal. App.3d 438, 445 [152 Cal. Rptr. 167].) However, the court in In re Leonard R. viewed section 731 as being a mere codification of the Olivas rule. Hence, Penal Code section 2900.5 is not applicable by its terms to juvenile commitments. The court in In re Harm R. held a minor was entitled to credit for time in juvenile facilities against the maximum term of confinement based on section 726. As in In re Harm R., we need not reach the conflict between In re Leonard R. and In re Eric J.[*] because the matter will be remanded for further disposition by the trial court.

CYA COMMITMENT
Appellant contends the trial court erred in committing him to the California Youth Authority because the court did not support a finding that appellant would benefit by such confinement. This contention ignores the fact there had been various unsuccessful attempts and placements in efforts to rehabilitate him over a period of five years. The probation officer recommended commitment to the California Youth Authority. The court, although expressing regret that an alternative commitment would not be beneficial, made a positive finding that the commitment to the California Youth Authority would benefit appellant.
*984 Appellant cites In re Aline D. (1975) 14 Cal.3d 557 [121 Cal. Rptr. 816, 536 P.2d 65] in support of his position. This case is simply not applicable to the present facts. In In re Aline D., the judge, two psychiatrists, a clinical psychologist and the probation officer all apparently agreed the defendant was not a proper subject for commitment to the California Youth Authority, but nevertheless committed her because there was no other recourse. (Id., at p. 561.)
This court noted in In re Willy L. (1976) 56 Cal. App.3d 256 [128 Cal. Rptr. 592], "`It is well settled in California that when a public offense has been committed by a juvenile, certification of the juvenile to the CYA is within the sound discretion of the committing court, be it the juvenile court (Welf. & Inst. Code, §§ 731, 1736) or the superior court (Welf. & Inst. Code, § 1731.5.) [Citations.] The decision of the juvenile or superior court may be reversed on appeal only upon a showing that the court abused its discretion in committing the minor to the CYA. [Citations.] A reviewing court must indulge in all reasonable inferences to support the findings of the juvenile court, and such findings will not be disturbed on appeal when there is substantial evidence to support them. [Citation.]'" (In re Willy L., supra, at p. 265, citing In re Clarence B. (1974) 37 Cal. App.3d 676, 682 [112 Cal. Rptr. 474].) (14) The minor was found to have committed two nighttime burglaries of occupied motel rooms requiring a substantial degree of cunning and stealth. Such offenses show sophistication and present serious risk to the minor and the victims. The evidence supports the court's finding that it is probable the minor will benefit from a California Youth Authority commitment. (In re Darryl T. (1978) 81 Cal. App.3d 874, 877 [146 Cal. Rptr. 771]; In re John G., supra, 72 Cal. App.3d 242, 246-247; In re Willy L., supra, 56 Cal. App.3d 256; In re Clarence B., supra, 37 Cal. App.3d 676.)

Was appellant denied equal protection under the law and awarded "cruel and unusual punishment" because his punishment was "harsher" than that of the other minor involved in this incident?
At the outset, it should be noted there is no evidence in the record reflecting what type of disposition was received by appellant's accomplice or the prior record of the accomplice. (15) "It is elementary that the function of an appellate court, in reviewing a trial court judgment on direct appeal, is limited to a consideration of matters contained in the record of trial proceedings, and that `Matters not presented by the record cannot be considered on the suggestion of counsel in the briefs.' [Citations.]" (Fn. omitted.) (People v. Merriam (1967) 66 Cal.2d 390, 396-397 [58 Cal. Rptr. 1, 426 P.2d 161].)
*985 Furthermore, even accepting appellant's contention that the two received different punishment, appellant has cited no authority for the novel proposition that two persons committing the same offense, who do not receive the same punishment, is a per se violation of equal protection of the laws and constitutes cruel and unusual punishment. We noted in People v. Mata (1978) 85 Cal. App.3d 233 [149 Cal. Rptr. 327], "that in cases where there are multiple defendants, or in multiple cases arising out of the same offense, the mere fact standing alone that [judgments] are, or appear to be, inconsistent does not give rise to collateral estoppel. Specific issues may be decided differently in different cases." (Id., at p. 237.) This principle is even more applicable to variations in punishment which depend on the particular circumstances with a consideration of past conduct.
(16) A commitment of a minor to the Youth Authority for the maximum term provided by sections 726 and 731 does not constitute cruel and unusual punishment. (See In re Aaron N., supra, 70 Cal. App.3d at pp. 939-940.) If the trial court exercises its sound discretion in setting such term appellant was not denied equal protection of the law or awarded cruel and unusual punishment even if his accomplice did not receive a similar commitment.

Does appellant's allegation that group homes were unavailable in San Luis Obispo County deprive appellant of equal protection under the law?
The only evidence in the record concerning this contention of appellant is a comment by his trial counsel that the minor had never been tried in a group home. The record is clear that both the probation officer and the trial court considered other alternatives to commitment to the California Youth Authority but did not feel they were viable.[16]
The minor's conduct in less restrictive placements was considered. The record does not disclose the lack of availability of group homes in San Luis Obispo County and therefore the minor has no standing to assert such issue on appeal. (People v. Merriam, supra, 66 Cal.2d 390.) However, even assuming the county does not maintain group homes for juvenile *986 court wards, this does not mean such alternative is not available to the court. The minor was placed out of San Luis Obispo County previously in the Santa Barbara Juvenile Hall and in the Robert K. Meyers Boys Camp. Section 731 confers authority for the court to place the minor in a suitable group home among other alternatives mentioned in sections 727 and 730. The court has discretion which was exercised in this case to place the minor in a facility which is likely to facilitate his reformation and rehabilitation other than a state hospital. (In re Roger S. (1977) 19 Cal.3d 921, 935 [141 Cal. Rptr. 298, 569 P.2d 1286]; In re Aline D., supra, 14 Cal.3d at pp. 566-567.) Out-of-county facilities had been utilized in the past and appellant's contention that the court was in any way restricted by the absence of local group homes is without foundation in the record.
That part of the judgment determining the court had jurisdiction is affirmed. That part of the judgment ordering the disposition is reversed, and the cause is remanded with directions for the trial court to exercise its discretion in fixing the maximum period of physical confinement within the term as defined in section 726 and to otherwise proceed in accordance with this opinion.
Brown, (G.A.), P.J., and Franson, J., concurred.
A petition for a rehearing was denied May 16, 1979, and the opinion was modified to read as printed above.
NOTES
[*]   Assigned by the Chairperson of the Judicial Council.
[1]  All references are to the Welfare and Institutions Code unless otherwise indicated.
[2]  In People v. Beaumaster, supra, the court rejected a contention that the trial judge should have been disqualified, was prejudiced and could not be impartial because the judge was present when the defendant tried to enter a guilty plea.
[3]  People v. Pope, supra, was decided after oral argument. However, appellant raised the applicability of Pope criteria by relying upon In re Saunders, supra, 2 Cal.3d 1033, 1041.
[4]  All references are to the California Rules of Court unless otherwise indicated.
[5]  Section 726 provides in pertinent portion: "In any case in which the minor is removed from the physical custody of his parent or guardian as the result of an order of wardship made pursuant to Section 602, the order shall specify that the minor may not be held in physical confinement for a period in excess of the maximum term of imprisonment which could be imposed upon an adult convicted of the offense or offenses which brought or continued the minor under the jurisdiction of the juvenile court.

"... `maximum term of imprisonment' means the longest of the three time periods set forth in paragraph (2) of subdivision (a) of Section 1170 of the Penal Code, but without the need to follow the provisions of subdivision (b) of Section 1170 of the Penal Code ...
"If the court elects to aggregate the period of physical confinement on multiple counts, or multiple petitions, including previously sustained petitions adjudging the minor a ward within Section 602, the `maximum term of imprisonment' shall be specified in accordance with subdivision (a) of Section 1170.1 of the Penal Code.
"If the charged offense is a misdemeanor or a felony not included within the scope of Section 1170 of the Penal Code, the `maximum term of imprisonment' is the longest term of imprisonment prescribed by law." (Italics added.) (See § 731.)
[6]  Petition for rehearing in the Court of Appeal denied December 1, 1978.
[7]  The question of whether section 726 which authorizes a juvenile court to commit a minor adjudged a ward of the court for the longest of the three time periods specified for adults under Penal Code section 1170, without a finding of aggravating circumstances is a denial of the equal protection of the law is before the California Supreme Court. (See In re Eric. J. (Cal. App. Nov. 17, 1978) hg. granted, Jan. 17, 1979 (L.A. 31076)[*]; In re Dennis C. (Cal. App. Nov. 21, 1978) hg. granted, Jan. 17, 1979 (S.F. 23978)[].)
[8]  Adopted by the Judicial Council of the State of California effective July 1, 1977, after the trial proceedings in In re Aaron N. were concluded.

[*] Reporter's Note: for Supreme Court opinion see 25 Cal.3d 522 [159 Cal. Rptr. 317, 601 P.2d 549].
[] Reporter's Note: Cause retransferred to Court of Appeal with instructions. See 104 Cal. App.3d 16 for Court of Appeal opinion.
[9]  The advisory committee comments on rule 1373 consider the ambiguities in the 1977 amendment to section 726.
[10]  Advice of consequences of an admission is requisite to comply with Boykin-Tahl protections afforded a minor. (In re Ronald E. (1977) 19 Cal.3d 315, 321-323 [137 Cal. Rptr. 781, 562 P.2d 684].)
[11]  The error of the trial court in In re Aaron N. was that it failed to expressly state the actual commitment was based on the prior offenses, even though there was evidence in the record that the court considered the defendant's entire background. (Id., at p. 941.) However, in this case the trial court did expressly increase the commitment for prior offenses.
[12]  In In re Dennis C., supra, and In re Eric, J., supra, hearings were granted in the Supreme Court. (See fn. 7, ante.)
[13]  Burglary of the first degree is not an offense designated in section 707 or Penal Code section 1203.09 which raises the jurisdictional age limit from 21 to 23.
[14]  In re Owen E. (1979) 23 Cal.3d 398 [154 Cal. Rptr. 204, 592 P.2d 720] interpreted section 779 as limiting the authority of the juvenile court to vacate a proper California Youth Authority commitment to instances where it appears the California Youth Authority has failed to comply with the law or abused its discretion.
[15]  The Fourth District in In re Eric J., supra, held juveniles are entitled to such credit. (See fn. 7, ante.)
[*]   See footnote 7, ante.
[16]  The social report stated, "... throughout this time period, the supervising probation officer has, along with the family, in a concerted effort utilized available county level agencies. On the community level, the minor has had the benefit of the community mental health services, local psychiatrists, and placement with a sister in Hawaii. On the county level, the minor had had the benefit of several years of probation supervision and placement in the Robert K. Meyers Boys Camp. On the state level, the minor had had the benefit of the Youth Authority Diagnostic Center in Ventura, California."

The trial court said, "We have sent you to doctors, we have sent you to all kinds of places in the hope to make you see the light."
