re-added even more old code