TOPEKA — Missing children, too few beds, outdated technology: Kansas Gov-elect Laura Kelly will inherit a struggling child welfare system that officials have been trying to fix for years.

A class action lawsuit filed in federal court on Friday alleges that children have been treated so poorly that they have suffered mentally or run away from foster homes. They have been trafficked for sex, sexually abused inside adoptive homes or, in one instance, reportedly raped inside a child welfare office.

With the safety and future of thousands of Kansas children on the line, lawmakers, experts and advocates say the next governor must build on progress made over the past few months and invest significantly in the state's Department for Children and Families in order to ultimately strengthen the system.

Kelly, a Democratic state senator, won election in part by promising to improve the child welfare system. As she prepares to take office in January, she must decide how she wants to change the agency and who she wants to lead it.

"DCF is very high on my radar screen and will be a high priority in my administration," Kelly said in an interview.

"I will take the same approach to DCF, though, that we're going to take to every agency, which is to during the transition time to dig deep and figure out where the issues are, what's working, what's not working, and then set a course for fixing whatever we find that needs to be fixed," she said.

During a news conference just after her election, Kelly said the agency had been dysfunctional and under-resourced over the past eight years.

Kelly has not said whether she plans to retain current DCF Secretary Gina Meier-Hummel, who was appointed a year ago by Republican Gov. Jeff Colyer. Meier-Hummel would not say last week whether she is interested in joining the new administration but said she respects Kelly.

Many child advocates say they have faith that change may come with Kelly, who has been a member of the legislative task force aimed at improving the child welfare system.

"She really works on that task force," said Lori Burns-Bucklew, a Kansas City attorney and accredited child welfare law specialist. "She doesn't just show up."

But Kelly faces a strong challenge.

"She's inheriting an under-resourced system," Burns-Bucklew said. "This system has been stripped bare over the years. They haven't just cut to the bone. They've cut into the bone."

Christie Appelhanz, director of the Children's Alliance of Kansas, said the system "absolutely" has to do a better job of caring for children.

"There's a lot of chaos in the child welfare system. There's always chaos in the child welfare system, but there's more than normal right now," Appelhanz said.

Expert reports and high-profile incidents involving children, including child deaths, have painted a picture of a broken system over the past several years. A task force that has been meeting for more than a year will deliver its recommendations in January -- providing Kelly and lawmakers with a possible road map to follow to improve the system.

Kelly has been one of the task force members.

"The beautiful thing about Kelly inheriting this is Laura Kelly has participated in all the work reviewing this system," said Lori Ross, a long-time Missouri child advocate who is working to help improve the system in Kansas. "She knows the problems and she know what solutions have been proposed."

The task force has looked into the need to cultivate a stable workforce at DCF. Frequent turnover affects caseloads, members of the task force have said. A previous state audit found that caseloads for some case managers often exceeded best-practice guidelines, though the agency has said it has reduced the number of vacant positions among child welfare staff.

"The immediate thing she'll work on is making sure, I think, the caseloads are covered appropriately so at least people get evaluated properly and followed up, monitored. Because that's where those deaths happen and we cannot have that," said Sen. Barbara Bollier, a Mission Hills Republican.

DCF has been working for the past year to reduce the number of missing children in foster care after revelations that upwards of 70 children were missing from DCF custody. The agency has since begun devoting more resources, including investigators, to finding those missing children, many of whom are runaways.

A waiting list remains for children seeking admission to psychiatric residential treatment facilities. The number of psychiatric beds available to children in Kansas has fallen to 282 from 780 in 2011. Advocates have said the lack of psychiatric beds contributed to children sleeping in the offices of DCF contractors.

DCF has promised to fine contractors who allow children to sleep in their offices.

DCF and the child welfare task force both focused on the agency's outdated computer systems as one of the most pressing needs. One preliminary report to the task force called the system antiquated.

In order to complete a report, social workers at times may need to access up to nine different systems, Meier-Hummel said. The agency is also unable to easily share electronic records with schools and law enforcement.

The system in place at DCF currently has been in use since before the internet, she said.

"We're very far behind. In fact, I think the word when we had someone come study our system, was 'One step above paper.' So that far behind," Meier-Hummel told lawmakers recently.

And the consequences of such an outdated system can be much more serious than simple inconvenience.

"Literally, I believe, it is potentially putting children's lives at risk to not be able to get the information we need quickly out to the field to do the work they need to do," Meier-Hummel said.

Rep. Linda Gallagher, a Lenexa Republican, emphasized the need to upgrade DCF's systems. Gallagher sits on the child welfare task force, but recently lost her bid for re-election.

"It means things are inefficient, creating much more work for staffers. And they can't always track where a kid is in the system," Gallagher said. "When we have kids bopping around from one-night placement to one-night placement, and you can't track them necessarily at DCF, that's a problem."

Gallagher said it is possible to convince legislators that DCF's technology is an area that needs to be fixed. The challenge will be the price. She estimates upgrades could cost the state upwards of $27 million.

Rep. Monica Murnan, a Pittsburg Democrat, said she hopes the Legislature next year recognizes the degree to which Kansas has relied on contractors to operate the child welfare system.

"We have got to recognize our responsibility and our role in this" and hold the system accountable, she said.

Kelly, Murnan and other lawmakers have also drawn a link between improving the child welfare system and addressing restrictions on welfare eligibility that have been put in place over the past several years.

Limits imposed by Gov. Sam Brownback and later codified by lawmakers on welfare programs, such as food and cash assistance, are contributing to rising numbers of children in state care, some lawmakers and advocates say. A 2017 study by researchers at the University of Kansas found that restrictions on cash assistance increased foster care placements.

"So I think as we're looking at how we fix our foster care system, our child welfare system overall, that obviously will become part of the discussion," Kelly said, referring to welfare programs.

Kelly will become governor on Jan. 14. The Senate will need to confirm whoever she selects to lead DCF and she will need to submit a budget proposal that includes any additional funding she wants for the agency.

Lawmakers also will begin sifting through the task force's recommendations.

"It is going to require a disciplined approach to fixing the various problems within the system. I know people are anxious for progress, and I am as well," Gallagher said. "But I just know how complex the system is and how broken it is in many cases and it is just going to take time to improve."