changed firstOutput to numUnits in toLowLevel