On the taxation of the defendant’s costs, objection was made to seven items, of $10 each, for taking the depositions of the plaintiff and his six witnesses in the city of Hew York, but the objection was overruled by the taxing officer, and such costs were taxed. Upon appeal to the special term for retaxation, that court directed that such items be struck out, and from the order entered thereon this appeal is taken. The place of trial of this action was originally in the county of Flew York, but upon motion of the defendant it was changed to the county of. Monroe. On the plaintiff’s *942appeal from that order to the general term in the first department the order was modified so as to require the defendant to stipulate that the evidence of the plaintiff and his witnesses should, at the election of the plaintiff, be taken before a referee in the city of New York. Accordingly a written stipulation was entered into by the attorneys for the respective parties for the taking of such testimony before a referee. The testimony of the plaintiff and his six witnesses was so taken in pursuance of the stipulation. By subdivision 3, § 3251, Code Civil Proc., the sum of $10 is given as costs “for taking the deposition of a witness or of a party, as prescribed in section 870, section 871, or section 893 of this act.” No question is made but that the defendant is entitled to $10 costs for each of the seven witnesses so examined, if anything. By section 870 the deposition of a party may be taken at any time before the trial, “as prescribed in this article.” By section 871, the deposition of a person, not a party, may be taken “as prescribed in this article.” The learned justice at the special term has apparently held that, where depositions are taken by stipulation, and not by order of the court upon motion, such costs are not allowable. He has, for the support of that conclusion, the decision of the special term of the superior court of the city of New York, in the case of Newman v. Greiff, 3 Civil Proc. R. 362, where it was held that there is no right given to costs to the prevailing party for taking a deposition pursuant to stipulation. We cannot concur in this view of the construction of these several sections of the Code. By section 879 it is provided that “the parties to an action may stipulate in writing that the deposition of a competent witness, to be used therein, may be taken before a judge or referee at a time and place specified in the stipulation, either orally, or upon interrogatories to be agreed upon in like manner.” Depositions taken under this section, by virtue of a stipulation, come as clearly within sections 870 and 871 as do those which are taken in pursuance of an order of the court under other sections of the same article of the Code. The testimony of the plaintiff was taken as prescribed by section 870, and that of his several witnesses as prescribed by section 871. These two sections relate to all cases where depositions of a party or of persons not parties maybe taken under this article of the Code. They constitute the authority for this procedure, and the succeeding sections, above referred to, relate to the mode of adducing the testimony. They control equally the cases where witnesses are examined by virtue of a stipulation, under section 879, as those taken in pursuance of an order of the court made upon affidavits, under sections 872 and 873. The order appealed from should be reversed, with $10 costs and disbursements. All concur.