
114 N.H. 317 (1974)
WILLIAM LANGEVIN & a.
v.
HILLSBOROUGH COUNTY.
No. 6638.
Supreme Court of New Hampshire.
May 31, 1974.
*318 Rinden & Tarrant and Eleanor Krasnow (Mr. Paul A. Rinden orally) for the plaintiff.
James A. Connor, county attorney, and William E. Brennan, assistant county attorney (Mr. Brennan orally), for the defendant.
LAMPRON, J.
Petition by William and Virginia Langevin seeking an order requiring the commissioners of Hillsborough County to immediately release a lien filed against their real estate in Contoocook to permit its sale. The Trial Court (Johnson, J.) ordered the discharge "without prejudice to the rights of the County to proceed against the net proceeds of a proposed sale" which were to be held in escrow pending a determination of the rights of the parties. Plaintiffs were also ordered to amend their petition "to present the issue of the validity of defendant's claim." The property was sold and the net proceeds of $4,450.52 were deposited with the clerk of the superior court.
A hearing on the merits of the county's claim held before Keller, C.J., resulted in certain findings and rulings and a decree ordering the clerk to distribute one-half of the funds held to Hillsborough County and the other half to Virginia Langevin. She has since received her share and is not a party to this appeal. William's exceptions to the findings, rulings and decree were reserved and transferred.
William had six children by a prior marriage. The divorce decree granted their custody to both parents and an order for their support was entered against the father. On September 3, 1963, the Manchester District Court found the six children to be neglected and awarded their custody to the division of welfare. RSA 169:10. It is agreed that in accordance with the order of that court "the children were provided foster care and Hillsborough County, as the legally chargeable unit, was required to assume the cost of the support and foster care." On November 9, 1972, when the matter was heard in superior court, the balance due the county for their support and foster care was *319 $15,139.57. This amount reflects a payment of $1,004.13 made by William in partial satisfaction of the support order made in the divorce proceedings. RSA 169:11 provides as follows: "Unless otherwise ordered by the court, the expense for the maintenance and care of any such [neglected] child shall be borne by the town in which the child resides, and the town shall have a right of action over for such expenses against whoever is legally chargeable for the child's support." Because of the order of the district court, the county has this right of action.
To enforce this obligation, the county in April 1969, recorded in the registry of deeds a lien against the real estate of the plaintiffs in Contoocook which was the subject matter of their petition against the county in the present case. In its brief the county takes the position that their action resulted in a valid lien under RSA 166:20 (Supp. 1973). This section provides in part that: "The amount of money spent by a county to support a county pauper ... shall ... be made a lien on any real estate owned by the county pauper." Relying on the cases of Croydon v. Sullivan, 47 N.H. 179 (1866), and Gilmanton v. Sanbornton, 56 N.H. 336 (1876), the county maintains that, because it supported his children, William could not obtain a settlement elsewhere and was therefore a county pauper and his real estate was subject to such a lien for the payments made. The plaintiff strongly opposes this contention claiming that William had obtained a settlement before the county started paying for the care of the children. It is unnecessary, however, to decide this issue which has "presented sticky problems" for towns and counties (Ebelt v. Ebelt, 103 N.H. 369, 371, 172 A.2d 363, 365 (1961)) as the existence or not of a lien is not material to the disposition of the case.
It is clear that the aid which the county provided to plaintiff William's children gave it a right of action to recover for such support against their father who was chargeable therefor either as support granted to dependent children (RSA 167:52) or to neglected children. RSA 169:11; New Hampshire Aid Soc'y v. Morgan, 107 N.H. 246, 248, 221 A.2d 238, 241 (1966); Barry v. Carroll, *320 98 N.H. 290, 99 A.2d 479 (1953). The issue of the respective rights of William and of Hillsborough County in the net proceeds of the sale of the real estate in question was presented to the trial court for decision as a result of the petition in equity brought by the plaintiffs. It is well-established law that a court of equity which has taken jurisdiction of a cause for any purpose will ordinarily retain jurisdiction for all purposes and decide all issues which are involved in the subject matter between the parties. Ellis v. Association, 69 N.H. 385, 389, 41 A. 856, 858 (1898); 27 Am. Jur. 2d Equity § 108 (1966); see Lessard v. Sleeper, 96 N.H. 268, 272, 74 A.2d 378, 380-81 (1950); Ebelt v. Ebelt, supra at 371-72, 172 A.2d at 365. Furthermore, a court of equity in deciding these issues will order to be done that which in fairness and good conscience ought to be or should have been done. West-Nesbitt Inc. v. Ralston Purina Co., 128 Vt. 498, 266 A.2d 469 (1970); 2 J. Pomeroy, Equity Jurisprudence §§ 365, 420 (1941).
The trial court found that the "County is entitled to reimbursement from William Langevin relative to sums expended by the County for care of William Langevin's children." In conformity with the above-stated equitable principles, the court ruled that "being a Court of Equity, [it] has the right to order the application of the funds of William Langevin on deposit with the Clerk to partial satisfaction of William Langevin's obligation to reimburse the County" and ordered the clerk of court to pay William's share, including interest, to the county. This order would apply also to any part of the retained funds which plaintiff argues represent the value of his homestead right in the property which he and Virginia have previously conveyed. Gerrish v. Hill, 66 N.H. 171, 19 A. 1001 (1889); Walpole Savings Bank v. French, 105 N.H. 407, 409, 200 A.2d 858, 860 (1964).
Decree affirmed.
All concurred.
