The Missouri Legislature passed a bill aimed at giving divorced parents more equal custody over their children.

The House voted 154-2 on Tuesday to prohibit courts from presuming a parent is more qualified to be a guardian based on his or her sex. The Senate passed the legislation on a 28-0 vote two weeks ago, so now it heads to the governor.

If a divorcing couple disagrees on how to share custody, the court would have to settle on written findings of fact before resolving the dispute. The bill also calls for the state courts administrator to post parenting plan guidelines online.

Democratic Rep. Gina Mitten, a lawyer, said the legislation still has a few technical issues that lawmakers will need to revisit next year.