McOOY, J.
On December 23, 1916, plaintiff, as a caretaker of two carloads of, hogs then being shipped from- Hettinger, N. D., to Sioux City, Iowa, was riding upon a drover’s pass on one of defendant’s trains near Thunderhawk, S. D., when the caboose in which plaintiff was riding became derailed by reason of the brakeman having thrown a switch too soon while said train was passing from1 the main track to and upon, a side track. The derailment of said -caboose caused plaintiff to be thrown and bumped against the sides .of the car and against a table, thereby injuring, bruising, and' spraining the hip, spine, and head of plaintiff. Thereafter, about September, 1917, plaintiff instituted this action to recover damages, alleging negligence in the throwing of said switch and the derailment of said caboose. Defendant answered, and, among other things, alleged that plaintiff at the time of said injury was traveling upon and under the terms of a certain contract,in writing entered into between himself and defendant company, and which - said contract provided that the company should in no event be liable to the owner or person in charge of said stock for any injury to his person happening upon the trains of the company in any amount exceeding $500, and further provided that no claim for loss or damage to said live stock, nor for injury to the person in charge thereof should be valid unless presented to the company in writing within four months after the same should have occurred. There was verdict and judgment in favor of plaintiff, from which defendant appeals. The contract, or drover’s pass, received in evidence contained the provisions alleged in the answer.
[1-3] At the close of all the evidence the appellant moved the court to direct a verdict on the ground that plaintiff had failed to show that he had' presented his claim for damages, or given notice of his claim in writing, within four months from the day of the *412accident, or injury, or at all. Appellant contends that under the provisions of the contract the giving of such notice was a condition precedent to plaintiff’s right ,of recovery. On the other hand, it is contended by respondent that under the provisions of section 8604a, U. S. Comp. Stats. 1918, being what is commonly known as the 'Carmack Amendment to the Interstate Commerce Act, he was not required to give notice of nor file a claim as a condition precedent to recovery. We are of the opinion that respondent’s contention is not well taken. In the case of C. R. I. & P. Ry. Co. v. Marcher, 248 U. S. 359, 39 Sup. Ct. 108, 63 L. Ed. -, it is held that the Carmack Amendment deals only with shipments of property, and not with transportation of persons. It therefore follows that causes of action for the recovery of personal injuries, such as that alleged in this case, are to be determined by the laws of this state, and that the question of the limitation of liability by contract is to be determined by the rule announced in Meuer v. C., M. & St. P. Ry. Co., 5 S. D. 568, 59 N. W. 945, 25 L. R. A. 81, 49 Ann. St. Rep. 898, under which ruling a common carrier may limit its liability by express contract signed by the parties, except as to gross negligence, fraud, or willful wrong of such carrier or its servants. It seems to be generally held that contracts between common carriers and their patrons, providing a time limit shorter than the general statute of limitations, in which notice and. filing of claim may be made, such as that appearing in the contract in question, are valid and not against public policy, and that unless such notice is given by the filing of such claim within the time specified in the contract no recovery can be had, and that the burden is on the plaintiff to show such compliance. Henry v. C., M. & St. P. Ry. Co., 84 Wash. 633; 147 Pac. 425; M., K. & T. Ry. Co. v. Lynn (Okl.) 161 Pac. 1058; M., K. & T. Ry. Co. v. Harriman, 227 U. S. 657, 33 Sup. Ct. 397, 57 L. Ed. 690. In this last cited case the court, in substance, said that the policy of statutes of limitations is to encourage promptness in the bringing oí actions that the parties shall not suffer 'by loss of evidence, from death or disappearance of witnesses, destruction of documents, or failure of memory. There is nothing in the policy or object of such statutes which forbids the parties to an agreement to provide a shorter ■period, provided the time is not unreasonably short. Such sti*413pulations have been sustained in a multitude of cases. Riddlesbarger v. Hartford Ins. Co., 7 Wall. 386, 19 L. Ed. 257; Express Co. v. Caldwell, 21 Wall. 264, 22 L. Ed. 556; C., R. I. & R. Ry. Co. v. Conway, 34 Okl. 356, 125 Pac. 1110; Cooke v. N. P. Ry. Co., 22 N. D. 266, 133 N. W. 303. in this last-cited case from North Dakota it was held that such a provision in a contract limiting a time for presenting a claim for loss is not a limitation •of liability^ We are therefore of the opinion that the motion to direct a verdict should have been granted, and that the court erred in its denial.
[4] Appellant by its answer pleaded as a bar to plaintiff’s cause of action that plaintiff was a nonresident of the state of South Dakota, at the time of the commencement of the action, and had failed to give security for costs as required by section 433, Code of Civil Procedure. At the time the cause was brought on for trial and before the calling of the jury, defendant presented to the court its first defense by way of plea in abatement, and moved for a dismissal of the action. It was then admitted by plaintiff that he was a nonresident of the state of South Dakota, and he then asked permission of the court to be permitted to furnish security for costs, and that he be given a reasonable op-portunity to secure the same. The court thereupon denied defendant’s motion to dismiss the action. We are of the view that ‘the court committed no error in this ruling, the record showing that plaintiff subsequently furnished such security for costs.
The judgment and order appealed from are reversed, and the •cause remanded for new trial.