We are not satisfied that the portion of the judgment of divorce nisi awarding custody of the parties’ minor child to the wife can be sustained without further findings. In awarding custody to the wife the judge seems not to have applied the appropriate criteria. See G. L. c. 208, § 31. See also Smith v. Smith, 361 Mass. 855 (1972).
In a proceeding involving custody of a child, “as matter of law and as matter of humanity” “[t]he governing principle by which the court must be guided in deciding the issues raised is the welfare of the child” (emphasis supplied). Hersey v. Hersey, 271 Mass. 545, 555 (1930). Jenkins v. Jenkins, 304 Mass. 248, 250 (1939). Heard v. Heard, 323 Mass. 357, 375-377 (1948). Stevens v. Stevens, 337 Mass. 625, 627 (1958). Clifford v. Clifford, 354 Mass. 545, 548 (1968). Vilakazi v. Maxie, 371 Mass. 406, 409 (1976). Masters v. Craddock, 4 Mass. App. Ct. 426, 428 (1976). This court will not sustain a custody award unless all relevant factors in determining the best interests of the child have been weighed. Haas v. Puchalski, 9 Mass. App. Ct. 555, 556 n.5 (1980). The weight ascribed to the respective factors is to be measured solely in terms of its effect on the welfare or well being of the child.
Even assuming that the father has violated G. L. c. 272, § 16, we think that under the decided cases the award of custody cannot be sustained solely on that ground, apart from any relationship to the “welfare of the child.” Cf. Tolos v. Tolos, 11 Mass. App. Ct. 708, 710 (1981). Such “conduct on [his] part cannot be permitted to interfere with the welfare of the child, the paramount and governing consideration.” Heard v. Heard, supra at 377. The award of custody to one parent is not a device to be used by judges to discipline the other parent for his or her “shortcomings.” Hersey v. Hersey, supra. Stevens v. Stevens, supra. Clifford v. Clifford, supra (“Custody is not a prize . . .”).
On rehearing, the findings should examine the relative advantages of the respective parental environments. Findings also would be appropriate concerning (1) the length of time the child has been in her pres*900ent environment and under the primary care of her father at his home and (2) whether and in what respects that environment has been helpful or detrimental to the child’s well being.
David Burres for Paul Bouchard. Jack N. Sarkisian for Donna Bouchard.That portion of the judgment granting custody to the wife is reversed. The case is remanded to the Probate Court solely on that issue. The judge’s subsidiary findings should state all the relevant factors on which his general conclusion is based. Pending such further hearing and until the entry of any new order and judgment by the Probate Court, the stay ordered by the single justice of this court shall remain in full force and effect. Costs and expenses are to be in the discretion of the Probate Court.
So ordered.