There's an organisation that does a report to advise the judge who the kids should live with. It is very rare for a judge to go against their report. The person doing the report is to recommend the kids live mostly with their mother despite the fact that she will require childcare and I wouldn't etc. etc.