For the 19th-century social reformers of the Children's Aid Society of Pennsylvania, the solution often lay outside Philadelphia, in the homes of benevolent strangers.
The open arms of a stable family and the peace of the countryside would be the salvation of the youngest victims of privation and abandonment in a city struggling with immigrant waves, industrialization, and poverty.
So off they went to the Pennsylvania suburbs and South Jersey - untold legions swept up in what was called the Orphan Train Movement and ushered into an uncertain future, the do-gooders' best intentions notwithstanding.
Their forgotten stories are being told as part of a Villanova University project examining the lives of children who were usually too poor and rootless to show up in government documents, but who soon will have an audience beyond anything they could have imagined.
"City of Children: Rescuing Children in Turn of the Century Philadelphia," compiled by six graduate students supervised by history professor Judith Giesberg, includes biographies of 10 waifs who came under the care of the Children's Aid Society (CAS) between 1883 and 1904.
There was Joseph Bosley, taken in at 2 months of age after his mother nearly starved him on a diet of only condensed milk that might have been contaminated. He was adopted by a Bucks County family.
The McGary sisters, 11-year-old Florence and 5-year-old Arletta, were placed with a family in New Hope. Their father had been jailed for stealing horses, and their mother couldn't afford to keep all four of her daughters.
Eventually, the family was reunited. But not every story ended so well.
Genevieve Farrell, 8, and sister Gertrude, 5, were repeatedly moved among foster homes because they were not white. Their dead father was, but their mother, who was institutionalized, was described as "Spanish."
"Family wish Genevieve removed because they believe she is colored," one case worker wrote. "Genevieve cried passionately when told."
The biographies were gleaned from CAS case files kept at the Historical Society of Pennsylvania, which plans to post them on its website by the end of September as part of an education curriculum for teachers. They will also be added to the society's Encounters database for people researching genealogy.
The Children's Aid Society, founded in 1882, was patterned after a group established in New York by reformer and philanthropist Charles Loring Brace, who started the Orphan Train Movement in 1853. Brace developed a program that relocated poor and abandoned children from the city's streets and orphanages to foster homes, first in upstate New York and then to the Midwest, the South, and New England.
The New York agency transported more than 250,000 between 1853 and 1929. Its Philadelphia incarnation operated on a smaller scale. How many children came under its purview, it is not possible to say, except that there were thousands.
Founded by a group of concerned residents, mostly women, the Children's Aid Society of Pennsylvania was one of the earliest city groups dedicated to helping children. It focused first on keeping families together, and second on resettling children in foster homes when circumstances were deemed dire.
Youngsters from families in which parents were sick, dead, vanished, destitute, or otherwise unable to keep them were taken into the agency's care.
"In the late 19th century, there was an intense new interest in rescuing children, to rethink the way children are treated . . .," Giesberg said. "This was the Progressive Era. Progressives believe they can fix anything."
The city was "bigger, denser and poorer in a lot of ways," said Helen Gassman, 24, of Philadelphia, one of the graduate students who worked on the project.
The CAS workers chronicled their efforts to rescue children from parlous circumstances, writing in flowery script on the pages of nine large black books, now in the Historical Society's collection. Each child's age, race, and family background were noted, house visits recounted, and the youngster's physical, mental, and moral condition assessed each time.
"I learned how vulnerable these kids could be even when there was a resource like Children's Aid Society," said graduate student Andrew Zetts, 25, who researched the life of one Charles Harvey.
Charles was 13 when he came under the care of the agency because his father had died and his mother was sick with cancer. Harvey was sent to live with a family near Scranton. But 10 months later, he was dead, hit by a train while delivering milk in his wagon.
By his own doing, Madison Ulysses Ayles, 11 and African American, went through four foster homes in two years. He ran away from the first three - white families who described him as unruly and disruptive, said Charlie Withers, the Villanova student who researched his life. But Ayles' fourth placement, with a black pastor in Avondale, Chester County, seemed to provide a sense of belonging. He eventually ran away from there, too.
Through its history, CAS helped pass legislation outlawing the placement of children in the same institutions as adults, and helped pioneer training for area social workers.
Along the way, it merged with other children's aid groups, including the Philadelphia Home for Infants, and grew through the formation of county chapters throughout the state.
In 2008, the agency joined the Philadelphia Society for Services to Children to form Turning Points for Children, near 15th and Lombard Streets, which provides social services to 9,000 men, women and children.
The Villanova grad students had hoped to find descendants of the children whose lives they researched, and reached beyond their release from the agency's care. But only James Schmitt, 28, found documentation about his subject's life as an adult.
Arletta McGary, who lived with the New Hope family as a child until her father was released from jail, moved to the Bronx. By 1930, she had married Frederick Gordon, with whom she had two children, Dorothy and Robert.
For the CAS children, the last chapters wait to be filled.