1. This was a contest for the custody of three minoi’ children, to wit, a girl aged eighteen, and two boys aged respectively fourteen and sixteen years. The petition was brought by the grandmother of the children against the mother and a third person on whose land the mother lived. It was alleged, that the mother was a lewd woman and that she was living in a state of adultery with the eodefendant; that the mother had recently given birth to an illegitimate child; that the mother was under the control of the codefendant; and that through his control of the mother he held the children in a state of involuntary servitude. To the petition for habeas corpus the defendants demurred upon the grounds that there was a misjoinder of parties defendant, and, it appearing that the youngest of the children was over fourteen years of age, the court was without jurisdiction to grant the relief prayed. The demurrers were overruled. Upon the trial of the ease the daughter and the elder son stated that they preferred to live with their mother. The younger son stated that he desired to live with an uncle. The court awarded the custody of the younger son to the uncle selected by him, the elder son to another uncle, and the daughter to an aunt. The *100finding of the ordinary was approved by the judge of the superior court on an application for certiorari; and the defendants excepted. Held-.
No. 1618. April 14, 1920. Habeas corpus. Before Judge Kent. Laurens superior court. July 17, 1919. J. 8. Adams, for plaintiffs in error. B. Bari Gamp, contra.(а) Where an application for the writ of habeas corpus affirmatively shows on its face that the restraint complained of is legal, the court before whom the writ is made returnable has the power, on demurrer, to dismiss the writ and remand the applicant. Smith v. Milton, 149 Ga. 28 (98 S. E. 607). Nevertheless, where the person .detained is before the court, the better practice is to inquire into the cause of the restraint and pass such order as the justice of the case requires. Simmons v. Georgia Iron etc. Co., 117 Ga. 305 (43 S. E. 780, 61 L. R. A. 739). See also Plunkett v. Hamilton, 136 Ga. 72, 80 (70 S. E. 781, 784, 35 L. R. A. (N. S.) 583, Ann. Cas. 1912B, 1259).
(б) In habeas-corpus proceedings to determine who is entitled to the custody of a minor over the age of fourteen, the wish of the minor, while entitled to due consideration, is not in all circumstances necessarily controlling. Where the respondent is shown to be an improper person to have the custody of such child, the court may exercise its discretion as to whom the custody of such child should be given, and shall have power to award the custody to a third person. The interest of the child must be given consideration. Civil Code, § 2972; Hunter v. Dowdy, 100 Ga. 644 (28 S. E. 387); Barlow v. Barlow, 141 Ga. 535 (81 S. E. 433, 52 L. R. A. (N. S.) 683).
(c) The demurrer to the petition and the motion to quash the writ upon the grounds stated were properly overruled.
2. Upon the trial of the case the court admitted evidence that the general reputation of the mother for chastity was bad, and that the general reputation of the codefendant for chastity was likewise bad. Objection was urged to the admissibility of this evidence, upon the ground that the same was irrelevant and immaterial. Held, that the evidence was properly admitted. Moore v. Dozier, 128 Ga. 90 (57 S. E. 110).
3. Upon the trial a letter alleged to have been written by the minor daughter a short time before the hearing, in which she indicated a wish to leave the home of the mother, was admitted in evidence. Held, that the execution of the letter by the daughter was prima facie proved, and the letter was admissible in evidence under the facts in this ease.
4. The court was authorized to find that the uncles and the aunt to whom the custody was awarded were proper persons to have the custody of the minors, and that they were financially able and willing to support and educate the children.
5. The ordinary by whom the writ of habeas corpus was issued and heard committed no error in any of the rulings complained of; and the judge of the superior court did not err in overruling the certiorari.
Judgment affirmed.
All the Justices concur, except Gilbert, J„ absent for providential cause.