
141 Cal.App.3d 23 (1983)
190 Cal. Rptr. 81
DANIEL J. BERGIN et al., Plaintiffs and Appellants,
v.
JULIAN PORTMAN, Defendant and Respondent.
Docket No. 65144.
Court of Appeals of California, Second District, Division One.
March 18, 1983.
*24 COUNSEL
John D. Schenck, Richard N. Ellner, Ellner, Prager, Schenck & Stone and Ellner, Prager & Schenck for Plaintiffs and Appellants.
Schibel, Hinojosa & Liebenbaum and Lynard C. Hinojosa for Defendant and Respondent.
OPINION
LILLIE, J.
Plaintiffs appeal from judgment dismissing their action for delay in bringing it to trial.
*25 On July 21, 1976, plaintiffs filed a complaint for specific performance of a contract to sell real property and damages for breach of that contract. On February 7, 1977, summary judgment was entered in favor of plaintiffs. On April 26, 1977, defendant filed a notice of appeal. The judgment was reversed and on May 12, 1978, remittitur was filed by the clerk of the trial court. On July 20, 1978, plaintiffs filed an at-issue memorandum. On May 21, 1981, counsel for the respective parties executed a stipulation/declaration in lieu of personal appearance at trial setting conference scheduled for June 4, 1981. On the latter date the court, guided by counsel's availability as indicated in the stipulation/declaration, set the case for trial on November 24, 1981. On August 3, 1981, defendant moved to vacate the trial date and dismiss the action on the ground that plaintiffs had failed to bring it to trial either within five years after the complaint was filed or within three years after the remittitur was filed in the trial court following reversal of the summary judgment. (Code Civ. Proc., § 583, subds. (b), (c).)[1] In his memorandum of points and authorities in support of the motion, defendant argued that apart from the provisions of section 583, the court had inherent power to dismiss for lack of diligent prosecution. On August 20, 1981, judgment was entered dismissing the action under subdivision (c) of section 583.
Section 583 provides in pertinent part: "(b) Any action heretofore or hereafter commenced shall be dismissed by the court in which the same shall have been commenced ... on motion of the defendant, after due notice to the plaintiff or by the court upon its own motion, unless such action is brought to trial within five years after the plaintiff has filed his action.... [¶] (c) ... When in an action after judgment, an appeal has been taken and judgment reversed with cause remanded for a new trial ..., the action must be dismissed by the trial court, on motion of defendant after due notice to plaintiff or of its own motion, unless brought to trial within three years from the date upon which remittitur is filed by the clerk of the trial court. Nothing in this subdivision shall require the dismissal of an action prior to the expiration of the five-year period prescribed by subdivision (b).... [¶] (f) The time during which the defendant was not amenable to the process of the court and the time during which the jurisdiction of the court to try the action is suspended shall not be included in computing the time period specified in any subdivision of this section."
(1a) Plaintiffs contend that under these provisions the time during which the court's jurisdiction to try the case was suspended, i.e., from the filing of defendant's notice of appeal on April 26, 1977, to the filing of the remittitur on May 12, 1978 (a period of one year and sixteen days), must be excluded from the five-year period specified in subdivisions (b) and (c); accordingly, the time within which the action had to be brought to trial to avoid a mandatory *26 dismissal did not expire on July 21, 1981, but was extended for a period of one year and sixteen days to August 6, 1982.
"In construing a statute the function of the judge is simply to ascertain what in terms or substance is already there and not to insert what has been omitted or to omit what has been inserted. (Code Civ. Proc., § 1858.) Under the guise of construction the court will not rewrite a law .... and it will not give the words an effect different from the plain and direct import of the terms used." (Estate of Tkachuk (1977) 73 Cal. App.3d 14, 18 [139 Cal. Rptr. 55].) (2) Also, all parts of a statutory scheme must be construed as a whole to the end that none is useless or deprived of meaning. (Romak Iron Works v. Prudential Ins. Co. (1980) 104 Cal. App.3d 767, 776 [163 Cal. Rptr. 869].) (1b) In light of these principles we conclude that plaintiffs' contention is correct. Subdivision (c) of section 583 specifies that the three-year limitation placed upon bringing an action to trial after the filing of remittitur following reversal on appeal and remand for a new trial[2] shall not require the dismissal of an action prior to the expiration of the overall five-year period from the date of the original filing of the action as provided in subdivision (b). (See Review of Selected 1972 California Legislation (1973) 4 Pacific L.J. 316; McDonough Power Equipment Co. v. Superior Court (1972) 8 Cal.3d 527, 533-534, fn. 5 [105 Cal. Rptr. 330, 503 P.2d 1338].) Subdivision (f) provides that "the time during which the jurisdiction of the court to try the action is suspended shall not be included in computing the time period specified in any subdivision of this section." (Italics added.) In discussing this provision, Witkin states: "If, for any reason, the trial court for a time loses jurisdiction of the case, and cannot try it, it would be wholly unjustifiable to penalize the plaintiff for failing to bring it to trial during such time. Accordingly, the time during which such jurisdiction is suspended is not counted as part of the period. The obvious example is an appeal, which removes the cause to the appellate court." (4 Witkin, Cal. Procedure (2d ed. 1971) Proceedings Without Trial, § 103, p. 2765; original italics.) In determining whether plaintiffs' action was subject to dismissal we may not ignore subdivision (f), which is expressly made applicable to all other subdivisions of section 583. Reading subdivisions (b), (c) and (f) as a whole compels the conclusion that in computing the date by which plaintiffs' action had to be brought to trial in order to avoid dismissal, the time during which the court's jurisdiction to try the action was suspended because of defendant's appeal from the summary judgment must be excluded from the overall five-year period commencing with the filing of the complaint. The result is that plaintiffs had until August 6, 1982, to bring their action to trial and the action therefore was improperly dismissed.
*27 (3) Defendant argues that even if the five-year period was tolled during the pendency of the appeal, the judgment of dismissal should be upheld on the ground that the trial court had the power to dismiss for lack of diligent prosecution independent of the provisions of section 583 (Gurst v. San Diego Transit System (1953) 119 Cal. App.2d 51, 54 [258 P.2d 1109]) and its decision may not be disturbed on appeal absent a manifest abuse of discretion. In support of this contention defendant cites Blue Chip Enterprises, Inc. v. Brentwood Sav. & Loan Assn. (1977) 71 Cal. App.3d 706 [139 Cal. Rptr. 651]. There, the defendant moved to dismiss under subdivisions (a)[3] and (b) of section 583. The minute order granting the motion stated that the action was dismissed under both subdivisions and on the "independent basis" of the trial court's consideration of the factors set forth in rule 203.5(e),[4] California Rules of Court, which applies only to the procedure to be followed when a party seeks dismissal of an action pursuant to subdivision (a) of section 583. On appeal from the judgment of dismissal the court, after concluding that neither subdivision (a) nor subdivision (b) was applicable, nevertheless affirmed the judgment stating: "However, we review the trial court's order, not its reasoning, and affirm an order if it is correct on any theory apparent from the record. It is long settled that a trial court has the power, unlimited by section 583, to dismiss an action where there has been inexcusable delay in bringing it to trial. [Citation.] Although subdivision (e) of rule 203.5 is not, in terms, applicable to this case, the considerations therein set forth are those that properly may guide a trial court in the exercise of its inherent power to control its calendar.... [¶] On the record before it, and before us, we cannot say that the trial court abused its discretion in dismissing this long pending litigation." (Blue Chip Enterprises, Inc. v. Brentwood Sav. & Loan Assn., supra, 71 Cal. App.3d at pp. 712-713.)
In the present case, unlike the situation in Blue Chip Enterprises, the record shows that dismissal was based exclusively on section 583 without reference to *28 any "independent basis" for the ruling.[5] There is no indication that the trial court exercised its discretion in dismissing the action, much less that it considered any of the factors set forth in rule 203.5(e), California Rules of Court. "`If a ruling which might have been made as a matter of discretion is based entirely upon other grounds, the appellate court will not consider whether the ruling would constitute a proper exercise of the discretionary power.'" (People v. Union Machine Co. (1955) 133 Cal. App.2d 167, 171 [284 P.2d 72].)
The judgment of dismissal is reversed.
Spencer, P.J., and Hanson (Thaxton), J., concurred.
NOTES
[1]  All statutory references are to the Code of Civil Procedure.
[2]  The unqualified reversal of a judgment, as in the present case, remands the cause for a new trial. (McDonough Power Equipment Co. v. Superior Court (1972) 8 Cal.3d 527, 532 [105 Cal. Rptr. 330, 503 P.2d 1338].)
[3]  Subdivision (a) provides: "The court, in its discretion, on motion of a party or on its own motion, may dismiss an action for want of prosecution pursuant to this subdivision if it is not brought to trial within two years after it was filed. The procedure for obtaining such dismissal shall be in accordance with rules adopted by the Judicial Council."
[4]  Rule 203.5(e) reads: "In ruling on the motion [to dismiss] the court shall consider all matters relevant to a proper determination of the motion, including the court's file in the case and the affidavits and supporting data submitted by the parties and, where applicable, the availability of the moving party and other essential parties for service of process; the extent to which the parties engaged in any settlement negotiations or discussions; the diligence of the parties in pursuing discovery or other pretrial proceedings, including any extraordinary relief sought by either party; the nature and complexity of the case; the law applicable to the case, including the pendency of other litigation under a common set of facts or determinative of the legal or factual issues in the case; the nature of any extensions of time or other delay attributable to either party; the condition of the court's calendar and the availability of an earlier trial date if the matter was ready for trial; whether the interests of justice are best served by dismissal or trial of the case or by imposing conditions on its dismissal or trial; and any other fact or circumstance relevant to a fair determination of the issue."
[5]  The judgment of dismissal states: "Good cause appearing therefor, the above entitled action is hereby dismissed under the provisions of Section 583(c) of the Code of Civil Procedure as to defendant, Julian Portman." The record on appeal contains no document indicating any alternative ground of dismissal.
