Nonprofit steps in as public schools struggle