
125 Cal.App.3d 317 (1981)
178 Cal. Rptr. 49
THE PEOPLE, Plaintiff and Respondent,
v.
ANTONIO RICARDO REDMAN et al., Defendants and Appellants.
Docket No. 38291.
Court of Appeals of California, Second District, Division Four.
November 5, 1981.
*320 COUNSEL
Mary J. Madsen and Dennis L. Cava, under appointments by the Court of Appeal, for Defendants and Appellants.
George Deukmejian, Attorney General, Robert H. Philibosian, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, Robert F. Katz and Roy C. Preminger, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
WOODS, J.
Appellants Redman and Rodney Jerome Overstreet were jointly charged in count I with robbery, in violation of Penal Code section 211. Count I further alleged that in the commission and attempted commission of the robbery, a principal was armed with a firearm within the meaning of Penal Code section 12022, subdivision (a). In addition, each of the appellants was alleged in count I to have personally used a firearm within the meaning of Penal Code section 12022.5 during the commission and attempted commission of the robbery.
Appellant Redman was also alleged to have been previously convicted of robbery (two counts), kidnaping and assault with a deadly weapon on a police officer. With respect to these felonies it was alleged that he served a prison term of one and one-half years, and that he failed to remain free of prison custody for five years immediately preceding the *321 filing of the first accusatory pleading in the instant case, within the meaning of Penal Code section 667.5, subdivision (b).
Both appellants pleaded not guilty and denied the use allegations. Appellant Redman initially denied the allegation of a prior felony conviction but subsequently admitted it after waiving his constitutional rights.
Motions on behalf of both appellants to suppress evidence under Penal Code section 1538.5, and a motion on behalf of appellant Redman under Penal Code section 995, were denied. Also denied were appellant Overstreet's motion for a separate trial and his motion challenging the composition of the jury panel.
Appellant Overstreet was sentenced to state prison for six years. The upper base term of five years was imposed on the robbery count, and the sentence was enhanced one year pursuant to Penal Code section 12022, subdivision (a), on the basis of the jury's principal armed finding. A sentence of eight years was imposed on appellant Redman. In addition to the upper base term of five years for the robbery conviction, Redman was ordered consecutively to serve terms of two years, pursuant to Penal section 12022.5, for the personal use of a firearm, and one year, pursuant to Penal Code section 667.5, subdivision (b), for the prior prison term. Both appellants received credit for time spent in presentence custody. Both appellants appeal from the judgments of conviction.
Appellant Redman contends that the trial court erred in enhancing his sentence by one year based on his commitment to the California Youth Authority for a prior felony.
Redman also alleges error in the trial court's denial of his motion pursuant to Penal Code section 995 to set aside the allegation in the information that he personally used a firearm.
Finally, both appellants assert that the trial court erroneously denied their motion under Penal Code section 1538.5 to suppress evidence seized pursuant to an invalid search warrant issued in one county and executed in another.
The relevant facts will be set forth in the discussions of the respective issues.


*322 I
Penal Code section 667.5 directs that enhancement of prison terms, for new offenses because of prior prison terms, be imposed where certain enumerated conditions are satisfied. Subdivision (b) of section 667.5 provides, in pertinent part: "[W]here the new offense is any felony for which a prison sentence is imposed, in addition and consecutive to any other prison terms therefor, the court shall impose a one-year term for each prior separate prison term served for any felony; provided that no additional term shall be imposed under this subdivision for any prison term served prior to a period of five years in which defendant remained free of both prison custody and the commission of an offense which results in a felony conviction."[1]
In the instant case, the information filed against appellant Redman alleged that, in November 1976, he was convicted in the Superior Court for the County of Los Angeles of two counts of robbery, a count of simple kidnaping, and a count of assault with a deadly weapon on a police officer. Each of these offenses is a felony. The information further alleged that appellant served a prison term for the commission of these offenses within the meaning of Penal Code section 667.5, subdivision (b).
(1) Appellant argues that his sentence may not be enhanced by reason of this CYA commitment,[2] since such a commitment may not be construed as a "prison term" within the meaning of Penal Code section 667.5. We agree.
In subdivision (h) of section 667.5, the Legislature defined "serving a prison term," for purposes of that section, to include "any confinement time in any state prison or federal penal institution as punishment for commission of an offense, ..." Two recent cases which have interpreted subdivision (h) are People v. Lara (1979) 95 Cal. App.3d 247 [158 Cal. Rptr. 847], and People v. Martinez (1980) 106 Cal. App.3d 524 [165 Cal. Rptr. 160]. These cases held, inter alia, that a commitment to the California Rehabilitation Center (CRC) could not be deemed a "prison term" for purposes of Penal Code section 667.5.
*323 In reaching this conclusion, the Lara and Martinez courts focused on the word "punishment" as it is used in subdivision (h). The court observed in Martinez that "[t]he use of the term `punishment' in defining a prison term is not incidental. As stated in Penal Code section 1170, `The Legislature finds and declares that the purposes [sic] of imprisonment for crime is punishment.'" (People v. Martinez, supra, 106 Cal. App.3d at p. 538.) The courts in Lara and Martinez cited statutory language to the effect that treatment under the addict commitment program was to be carried out for such nonpunitive purposes as rehabilitation of the addict and protection of the public. (People v. Lara, supra, 95 Cal. App.3d at p. 250; People v. Martinez, supra, 106 Cal. App.3d at pp. 538-539.)
Welfare and Institutions Code section 1700 states the purpose of the Youth Authority Act as being "to protect society more effectively by substituting for retributive punishment methods of training and treatment directed toward the correction and rehabilitation of young persons found guilty of public offenses."
In the case of In re Aline D. (1975) 14 Cal.3d 557 [121 Cal. Rptr. 816, 536 P.2d 65], the California Supreme Court articulated the broad principle that all juvenile commitment proceedings, including those relating to the CYA, are designed for purposes of rehabilitation and treatment, not punishment. (Id., at p. 567.) As support for this conclusion, the court cited Welfare and Institutions Code section 734, which requires that a commitment to the CYA be supported by a determination of probable benefit to the minor. (Id., at pp. 562, 567.)
It is also relevant that a statute containing language similar to that found in section 667.5, former Penal Code section 644, was repeatedly held inapplicable to CYA commitments.[3]
It is reasonable to assume the Legislature knew, when it simultaneously enacted section 667.5 and repealed section 644, that a CYA commitment had been held not to constitute a prison term for purposes of the latter statute. We therefore hold that a commitment to the CYA and the completion of a period of commitment in a CYA facility do not constitute the serving of a prison term within the meaning of Penal Code section 667.5.


*324 II
(2a) Appellant Redman also contends that the trial court erred in denying his motion under Penal Code section 995 to set aside the allegation of personal firearm use. He argues that the magistrate at his preliminary hearing made a specific factual finding that he did not use a firearm, and that the prosecutor was precluded by such finding from including the use allegation in the information filed against him. As support for this proposition, he cites the well established rule that "an offense not named in the [magistrate's] commitment order may not be added to the information if the magistrate made factual findings which are fatal to the asserted conclusion that the offense was committed." (Pizano v. Superior Court (1978) 21 Cal.3d 128, 133 [145 Cal. Rptr. 524, 577 P.2d 659].)
After considering the evidence offered at the preliminary hearing, the magistrate concluded that reasonable and probable cause existed to believe that Redman had violated Penal Code section 211, and that in the commission and attempted commission of said offense, Redman was a principal, and was armed with a firearm within the meaning of Penal Code section 12022, subdivision (a), but found insufficient evidence to support the allegation that Redman personally used a firearm within the meaning of Penal Code section 12022.5.
The substance of the magistrate's conclusion is contained in the following colloquy:
"MR. McGOWAN: To make it clear as to the second [sic] and third paragraphs as to count I there is not found to be sufficient evidence regarding Mr. Redman; is that correct?
"THE COURT: That's correct. It is clearly because there's only one witness as to Mr. Overstreet who specifically says Mr. Overstreet had the gun and there is no person who testified that Mr. Redman in fact had the gun but only that Mr. Overstreet seemed to be standing next to the person who really did have the gun.
".... .... .... ...
"MR. MARTINEZ: The Court isn't making a factual finding. The Court is leaving us free to file the 
*325 "THE COURT: All I can say, gentlemen, is that I listened to the evidence. I realize that the arguments of Counsel lead the Court to believe there's possibly a mistake in identification, but I've no identification of one person with the gun.
".... .... .... ...
"THE COURT: That's the finding of the Court. I'm not saying that prevents you from filing in superior court the allegation. I don't know. But that's the finding of the Court."
Following the magistrate's ruling, the district attorney filed an information against appellant Redman that included the personal use allegation. At trial, appellant moved, pursuant to Penal Code section 995, to set aside the allegation of personal use. His motion was denied.
In explaining the reasoning behind his decision to deny appellant's motion, the trial judge stated with respect to the magistrate's finding on the personal use issue: "I think it was a factual finding and I think the factual finding is supported by the record." Nevertheless, the trial court felt "compelled" to deny the motion on the authority of People v. Superior Court (Grilli) (1978) 84 Cal. App.3d 506 [148 Cal. Rptr. 740], in which it was held that the fact of great bodily injury charged in an accusatory pleading pursuant to Penal Code section 12022.7 could not be the subject of a motion to dismiss pursuant to section 995. (Id., at pp. 512-513.)
(3) The question appellant asks this court to decide is whether or not the trial court properly denied his section 995 motion. In order to reach the question, however, we must address the threshold issue of whether appellant's motion was properly before the trial court. If a section 995 motion is not an appropriate vehicle for requesting that a personal use allegation be set aside, then it is irrelevant whether the motion in this case was properly denied, since the trial court had no jurisdiction to rule on it.
Respondent's argument that a personal use allegation may not be challenged under section 995 is based, like the trial court's ruling, exclusively on the Grilli decision. Although the holding in Grilli was specifically limited to allegations of great bodily injury under section 12022.7, the court grounded its decision on a broadly based rationale. In the court's words: "Numerous cases have held that an examination *326 under section 995, paragraph 2d, subdivision 2, is limited to determining `if there is some rational ground for assuming the possibility that an offense has been committed and the accused is guilty of it.' (Caughlin v. Superior Court (1971) 4 Cal.3d 461, 464 [93 Cal. Rptr. 587, 482 P.2d 211], italics added; People v. Hall [(1971) 3 Cal.3d 992, 996 (92 Cal. Rptr. 304, 479 P.2d 664)]; Rideout v. Superior Court (1967) 67 Cal.2d 471, 474 [62 Cal. Rptr. 581, 432 P.2d 197].) Section 999 also envisions an offense in that it provides that `An order to set aside an indictment or information, as provided in this chapter, is no bar to a future prosecution for the same offense.' We hold that since section 12022.7 does not define a separate offense, but merely imposes additional punishment for the felony or attempted felony committed, an allegation made pursuant to section 12022.7 may not be the subject of a challenge on the ground that the defendant had been committed without reasonable or probable cause." (People v. Superior Court (Grilli), supra, 84 Cal. App.3d at p. 513.)
Under the Grilli rationale, an allegation of personal firearm use pursuant to Penal Code section 12022.5 could not be the subject of a section 995 motion since it does not define a "separate offense." Indeed, the Grilli court specifically cites section 12022.5 as an example of a statute which does not define a crime or offense but merely provides for a penalty to be imposed under certain circumstances.
The Grilli decision has been critically dissected in the now defunct Conway v. Superior Court (Nov. 26, 1980, 1 Civ. 49127) and in Ervin v. Superior Court (1981) 119 Cal. App.3d 78 [173 Cal. Rptr. 208]. We are persuaded by the reasoning in those cases and would decline to follow Grilli but for the Supreme Court's approval of its doctrine, reinforced by the decertification of the Conway case.
We reluctantly conclude, therefore, that a defendant may not move under Penal Code section 995 to set aside an allegation that he or she personally used a firearm within the meaning of Penal Code section 12022.5. It follows that in the instant case, appellant Redman's motion was not properly before the trial court.
Our analysis does not end with this determination however. (4) It is a fundamental rule of appellate review that a trial court's ruling or decision, if right upon any theory of law applicable to the case, must be sustained regardless of the considerations which may have moved the *327 trial court to its conclusion. (D'Amico v. Board of Medical Examiners (1974) 11 Cal.3d 1, 19 [112 Cal. Rptr. 786, 520 P.2d 10].)
(2b) Therefore, we next examine the nature of the magistrate's alleged factual finding. There is a corollary to the rule limiting, on the basis of a magistrate's factual findings, the offenses which may be added to an information. The Pizano court states that when a magistrate "either expressly or impliedly accepts the evidence and simply reaches the ultimate legal conclusion that it does not provide probable cause to believe the offense was committed, such conclusion is open to challenge by adding the offense to the information." (Pizano v. Superior Court, supra, 21 Cal.3d at p. 133.)
From an examination of the preliminary hearing transcript in the case at bar, it is apparent that the magistrate's finding on the issue of Redman's personal firearm use was a "legal conclusion." This was not a case where the magistrate stated in specific terms his finding that appellant did not personally use a gun. Nor did the magistrate here express disbelief of a witness whose testimony might have represented evidence in support of a finding of personal use. (See Pizano v. Superior Court, supra, 21 Cal.3d at p. 133.) The magistrate in this case simply affirmed Mr. McGowan's statement to the effect that as far as the personal use allegation was concerned there was not sufficient evidence to hold appellant to answer.
Finally, having found no other basis upon which to uphold the trial court's ruling, we must independently determine whether the evidence presented at the preliminary hearing furnished "sufficient cause" to believe that the allegation on which appellant was held to answer was in fact true. (People v. Eitzen (1974) 43 Cal. App.3d 253, 261 [117 Cal. Rptr. 772].)
Alan Charboneau, an attendant at a Carpinteria, California, gas station, testified that, on the night of January 11, 1980, while he was on duty at the gas station, a black and red Chevrolet Monte Carlo with four occupants drove up to the pumps. As he was replacing the car's gas cap, after having filled the tank, he heard the car door open, and almost immediately thereafter felt a gun against his neck and someone going through his pockets. Although he was never able to catch a glimpse of the gunman, Charboneau did see another participant in the robbery, whom he testified at the hearing "could have been" appellant Overstreet. The man identified as Overstreet took Charboneau's keys and *328 opened the cash box while the gunman took Charboneau's wallet and other items from his pockets. Charboneau did not see the two men get back into the car.
Another witness, Willie Turner, was a customer at the gas station when the robbery took place. From her car, which was parked at another pump, she saw the Monte Carlo drive into the station. A short time later she looked over and saw Charboneau in a stooped position while a man held a gun on him and went through his pockets. Turner, who testified that the gunman had red hair parted in the middle and "tied into a ball at the nape of his neck," positively identified the gunman as appellant Overstreet. He was the only one of the car's occupants that she saw out of the car.
After the man she identified as Overstreet finished going through Charboneau's pockets, Turner testified that he went back to the Monte Carlo and got in the back seat on the driver's side. She also testified that the driver had "short dark hair" and was wearing a football jersey. She positively identified the driver as appellant Redman.
After having been granted immunity from prosecution, Vickie Williford, who had been a passenger in the Monte Carlo during the robbery, testified at the preliminary hearing. By her account she had known appellants Redman and Overstreet less than a month at the time of the robbery. On the day of the robbery, she and a female friend had driven from Los Angeles to Oxnard with Redman and Overstreet to visit one of Overstreet's relatives. After the visit, the four left Oxnard in the Monte Carlo. Williford testified that she fell asleep shortly after the car left Oxnard, and when she woke up, the car was just leaving a gas station. She asked, "What's happening," and a male voice replied, "We just robbed a station." At that time she was riding in the back seat on the passenger side; Overstreet was driving, and Redman was riding in the back seat on the driver's side.
The Monte Carlo, after leaving the gas station, headed south on the freeway toward Ventura. Approximately 20 minutes later, on an offramp of the freeway near Ventura, the car was stopped by highway patrol officers and the occupants arrested. Shortly before their arrest, according to Williford, she exchanged shirts with Overstreet, whom she testified was wearing a football jersey. During the ride from the service station to Ventura, Redman was wearing the same leather jacket and brown pants he had been wearing all day. Williford testified that Redman's *329 hair was not red, or auburn, but that on the day of the robbery he was wearing it pulled back with a rubber band "[j]ust like a bun." Overstreet's hair, on the other hand, was "kind of a natural," and was not tied back.
One of the highway patrol officers who arrested appellants, Officer Sturm, testified that when he stopped the car on the freeway offramp, appellant Overstreet was driving. Sturm further stated that, when arrested, appellant Redman was wearing his hair "in a pony tail."
Based on this evidence, we conclude that there was "sufficient cause" to believe appellant Redman personally used a firearm during the commission of the robbery. The testimony of Charboneau and Turner represented strong evidence that a man, either appellant Redman or appellant Overstreet, held Charboneau at gunpoint and went through his pockets. Turner positively identified the gunman as Overstreet.
However, the evidence presented at the hearing strongly suggests that Turner's identification was mistaken. Turner herself positively stated that the gunman was wearing his hair tied back with a rubber band and that he got into the back seat of the car. She also testified that the driver's hair was not tied back, and that he was wearing a football jersey. The testimony of Williford and Sturm establishes that Overstreet was the driver of the car, that he wore a football jersey, and that his hair was "natural." Redman, according to the same testimony, occupied the back seat of the car, was not wearing a jersey, and had his hair tied back in a ponytail or bun. In addition, while Charboneau was unable to identify the gunman, he did testify that the gunman's accomplice, the man who took the cash box, "could have been" Overstreet.
Our view that the standard of "sufficient cause" is satisfied by the preliminary hearing evidence affords a legal basis for the trial court's denial of appellant Redman's motion under Penal Code section 995. We therefore affirm the ruling.

III
(5) Finally, both appellants join in asking this court to find error in the trial court's denial of their motion to suppress evidence pursuant to Penal Code section 1538.5. Appellants submit that under California law it is the rule (with certain exceptions) that a search warrant issued in one county and executed in another is invalid. They argue that the warrant *330 which authorized the search of the vehicle they were driving was invalid under this rule, and that the vehicle search was therefore illegal.
Appellants are permitted to seek review of the trial court's ruling on appeal from their convictions under subdivision (m) of Penal Code section 1538.5. Where, as in the instant case, a special hearing was held on a section 1538.5 motion, the scope of appellate review is limited to the record made at the special hearing. (People v. Bradford (1972) 28 Cal. App.3d 695, 700 [104 Cal. Rptr. 852].)
The following facts emerge from the special hearing record: Shortly after the robbery (on Jan. 11, 1980), California Highway Patrol Officers Gaeta and Sturm were on duty in their patrol car just north of Ventura. They received a call from a highway patrol dispatcher telling them to be on the lookout for a black and red Chevrolet, bearing license plate 963 ANB. The dispatcher stated that the vehicle had been involved in a robbery in the Santa Barbara area and was last seen heading for Ventura. When the officers spotted a vehicle matching the description given, they stopped it and arrested its four occupants, including appellants Redman and Overstreet. At the time of the arrest, the officers had neither an arrest warrant nor a search warrant. Appellants were taken to the Ventura County jail, where they remained until January 14, 1980.
After the arrest, Officer Speight, who had arrived on the scene, drove the suspects' vehicle to a nearby parking lot. Officer Gaeta then entered the vehicle to examine its contents. In the middle of the front seat he saw a knit cap containing a large amount of loose change. He also saw some loose coins on the floorboard. As he bent down to pick up the coins, he observed the butt of a shotgun or rifle under the seat. He removed the cap and change from the car, leaving the firearm undisturbed. Officer Speight then drove the vehicle to the highway patrol office. After the necessary storage reports had been filled out, the Chevrolet was towed to a towing service garage in Ventura.
On January 14, 1980, Michael Harling, deputy sheriff for the County of Santa Barbara, determined that appellants would be prosecuted in Santa Barbara County rather than Ventura County. He therefore had Santa Barbara County deputy sheriffs rearrest appellants at the Ventura County jail. On the same day, he went to the garage where the Chevrolet had been impounded, and, after obtaining a telephonic search *331 warrant from a magistrate of the Santa Barbara Municipal Court, searched the vehicle. His search yielded a variety of evidence including three firearms.
Appellants were in custody at the Ventura County jail when the search warrant was served. Later that same day, they were transferred to the Santa Barbara County jail, where they were booked. The charges in the instant case were filed against them on January 15, 1980, and appellants were arraigned in Santa Barbara County on the following day. No charges were ever filed against appellants in Ventura County.
Appellants cite People v. Grant (1969) 1 Cal. App.3d 563 [81 Cal. Rptr. 812], for the general proposition that the effect of a search warrant should be limited to the county in which the warrant was issued. However, as appellants recognize, the search in Grant was upheld, on a "hot pursuit" theory.
Appellants also rely on People v. Ruster (1976) 16 Cal.3d 690 [129 Cal. Rptr. 153, 548 P.2d 353, 80 A.L.R.3d 1269], overruled on other grounds in People v. Jenkins (1980) 28 Cal.3d 494, 503-504, footnote 9 [170 Cal. Rptr. 1, 620 P.2d 587]. Ruster involved a search of a San Mateo County residence on the authority of a search warrant issued by a Santa Clara County magistrate. But the defendant in that case had already been arrested and admitted to bail in Santa Clara County when the warrant was issued and the evidence related to those charges.
It is appellants' contention that the vehicle search at issue here was illegal since it was conducted pursuant to an out-of-county warrant and since neither a "hot pursuit" across county lines, nor a preexisting arrest in the issuing county, were involved. We find this contention to be without merit.
In addressing the issue of the validity of out-of-county warrants, the California Supreme Court said in People v. Fleming (1981) 29 Cal.3d 698, 707 [175 Cal. Rptr. 604, 631 P.2d 38]: "[W]e conclude, in accord with the controlling statutes and our decision in People v. Ruster ..., that a magistrate has jurisdiction to issue an out-of-county warrant when he has probable cause to believe that the evidence sought relates to a crime committed within his county and thus pertains to a present or future prosecution in that county. Dictum to the contrary in People v. Grant ..., is disapproved." (Fn. omitted.)
*332 Under the holding in Fleming, the warrant issued in the case before us must be considered valid if the issuing magistrate had the requisite probable cause. Appellants do not challenge the trial court's determination that sufficient probable cause existed to issue the warrant. We accept the trial court's determination. (People v. Dewson (1957) 150 Cal. App.2d 119, 129 [310 P.2d 162].)
The judgment is modified to eliminate the one-year enhancement of appellant Redman's sentence pursuant to Penal Code section 667.5, subdivision (b). As so modified, it is affirmed. As to appellant Overstreet, the judgment is affirmed.
Kingsley, Acting P.J., and McClosky, J., concurred.
NOTES
[1]  Subdivision (e) of section 667.5 provides: "The additional penalties provided for prior prison terms shall not be imposed for any felony for which the defendant did not serve a prior separate term in state prison."
[2]  Appellant's probation report indicates that, in November 1976, he was committed to the CYA and that he was paroled from that institution in October 1978.
[3]  People v. Lockwood (1956) 146 Cal. App.2d 189, 192 [303 P.2d 621]; In re Keller (1965) 232 Cal. App.2d 520, 526 [42 Cal. Rptr. 921]; People v. Wilkins (1967) 251 Cal. App.2d 823, 829 [60 Cal. Rptr. 49]; 17 Ops.Cal.Atty.Gen. 34.
